From 92eebcd11056326e67aa9a98ac5e9c6a3d4491d1 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Thu, 15 Oct 2020 16:36:19 +0200 Subject: [PATCH 1/2] modernize HelloworldXamarin example --- .../Droid/HelloworldXamarin.Droid.csproj | 103 - .../HelloworldXamarin/Droid/MainActivity.cs | 84 - .../Droid/Properties/AndroidManifest.xml | 5 - .../Droid/Properties/AssemblyInfo.cs | 45 - .../Droid/Resources/Resource.designer.cs | 112 - .../Droid/Resources/layout/Main.axml | 4 - .../Droid/Resources/mipmap-hdpi/Icon.png | Bin 2201 -> 0 bytes .../Droid/Resources/mipmap-mdpi/Icon.png | Bin 1410 -> 0 bytes .../Droid/Resources/mipmap-xhdpi/Icon.png | Bin 3237 -> 0 bytes .../Droid/Resources/mipmap-xxhdpi/Icon.png | Bin 5414 -> 0 bytes .../Droid/Resources/mipmap-xxxhdpi/Icon.png | Bin 7825 -> 0 bytes .../Droid/Resources/values/Strings.xml | 5 - .../HelloworldXamarin/Droid/packages.config | 58 - .../Assets/AboutAssets.txt | 10 +- .../HelloworldXamarin.Android.csproj | 101 + .../HelloworldXamarin.Android/MainActivity.cs | 33 + .../Properties/AndroidManifest.xml | 6 + .../Properties/AssemblyInfo.cs | 30 + .../Resources/AboutResources.txt | 24 +- .../Resources/Resource.designer.cs | 14000 ++++++++++++++++ .../Resources/layout/Tabbar.xml | 11 + .../Resources/layout/Toolbar.xml | 9 + .../Resources/mipmap-anydpi-v26/icon.xml | 5 + .../mipmap-anydpi-v26/icon_round.xml | 5 + .../Resources/mipmap-hdpi/icon.png | Bin 0 -> 4754 bytes .../mipmap-hdpi/launcher_foreground.png | Bin 0 -> 11695 bytes .../Resources/mipmap-mdpi/icon.png | Bin 0 -> 2807 bytes .../mipmap-mdpi/launcher_foreground.png | Bin 0 -> 6439 bytes .../Resources/mipmap-xhdpi/icon.png | Bin 0 -> 7028 bytes .../mipmap-xhdpi/launcher_foreground.png | Bin 0 -> 17898 bytes .../Resources/mipmap-xxhdpi/icon.png | Bin 0 -> 12827 bytes .../mipmap-xxhdpi/launcher_foreground.png | Bin 0 -> 33484 bytes .../Resources/mipmap-xxxhdpi/icon.png | Bin 0 -> 19380 bytes .../mipmap-xxxhdpi/launcher_foreground.png | Bin 0 -> 52285 bytes .../Resources/values/colors.xml | 7 + .../Resources/values/styles.xml | 18 + .../HelloworldXamarin.iOS/AppDelegate.cs | 31 + .../AppIcon.appiconset/Contents.json | 117 + .../AppIcon.appiconset/Icon1024.png | Bin 0 -> 70429 bytes .../AppIcon.appiconset/Icon120.png | Bin 0 -> 3773 bytes .../AppIcon.appiconset/Icon152.png | Bin 0 -> 4750 bytes .../AppIcon.appiconset/Icon167.png | Bin 0 -> 4692 bytes .../AppIcon.appiconset/Icon180.png | Bin 0 -> 5192 bytes .../AppIcon.appiconset/Icon20.png | Bin 0 -> 1313 bytes .../AppIcon.appiconset/Icon29.png | Bin 0 -> 845 bytes .../AppIcon.appiconset/Icon40.png | Bin 0 -> 1101 bytes .../AppIcon.appiconset/Icon58.png | Bin 0 -> 1761 bytes .../AppIcon.appiconset/Icon60.png | Bin 0 -> 2537 bytes .../AppIcon.appiconset/Icon76.png | Bin 0 -> 2332 bytes .../AppIcon.appiconset/Icon80.png | Bin 0 -> 2454 bytes .../AppIcon.appiconset/Icon87.png | Bin 0 -> 2758 bytes .../Entitlements.plist | 1 + .../HelloworldXamarin.iOS.csproj | 139 + .../HelloworldXamarin.iOS/Info.plist | 38 + .../HelloworldXamarin.iOS/Main.cs | 20 + .../Properties/AssemblyInfo.cs | 36 + .../Resources/Default-568h@2x.png | Bin 0 -> 8884 bytes .../Resources/Default-Portrait.png | Bin 0 -> 10710 bytes .../Resources/Default-Portrait@2x.png | Bin 0 -> 34540 bytes .../Resources/Default.png | Bin 0 -> 7243 bytes .../Resources/Default@2x.png | Bin 0 -> 8368 bytes .../Resources/LaunchScreen.storyboard | 39 + .../HelloworldXamarin/HelloworldXamarin.sln | 96 +- .../HelloworldXamarin/App.xaml | 8 + .../HelloworldXamarin/App.xaml.cs | 28 + .../HelloworldXamarin/AssemblyInfo.cs | 3 + .../HelloworldXamarin.csproj | 19 + .../HelloworldXamarin.projitems | 15 - .../HelloworldXamarin.shproj | 11 - .../HelloworldXamarin/MainPage.xaml | 14 + .../HelloworldXamarin/MainPage.xaml.cs | 63 + .../HelloworldXamarin/iOS/AppDelegate.cs | 77 - .../AppIcon.appiconset/Contents.json | 202 - .../iOS/Assets.xcassets/Contents.json | 6 - .../iOS/HelloworldXamarin.iOS.csproj | 151 - .../csharp/HelloworldXamarin/iOS/Info.plist | 48 - .../iOS/LaunchScreen.storyboard | 27 - examples/csharp/HelloworldXamarin/iOS/Main.cs | 38 - .../HelloworldXamarin/iOS/Main.storyboard | 40 - .../HelloworldXamarin/iOS/ViewController.cs | 91 - .../iOS/ViewController.designer.cs | 25 - .../HelloworldXamarin/iOS/packages.config | 58 - 82 files changed, 14862 insertions(+), 1254 deletions(-) delete mode 100644 examples/csharp/HelloworldXamarin/Droid/HelloworldXamarin.Droid.csproj delete mode 100644 examples/csharp/HelloworldXamarin/Droid/MainActivity.cs delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Properties/AndroidManifest.xml delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Properties/AssemblyInfo.cs delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/Resource.designer.cs delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/layout/Main.axml delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/mipmap-hdpi/Icon.png delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/mipmap-mdpi/Icon.png delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/mipmap-xhdpi/Icon.png delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/mipmap-xxhdpi/Icon.png delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/mipmap-xxxhdpi/Icon.png delete mode 100644 examples/csharp/HelloworldXamarin/Droid/Resources/values/Strings.xml delete mode 100644 examples/csharp/HelloworldXamarin/Droid/packages.config rename examples/csharp/HelloworldXamarin/{Droid => HelloworldXamarin.Android}/Assets/AboutAssets.txt (75%) create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/HelloworldXamarin.Android.csproj create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/MainActivity.cs create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Properties/AndroidManifest.xml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Properties/AssemblyInfo.cs rename examples/csharp/HelloworldXamarin/{Droid => HelloworldXamarin.Android}/Resources/AboutResources.txt (72%) create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/Resource.designer.cs create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/layout/Tabbar.xml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/layout/Toolbar.xml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-anydpi-v26/icon.xml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-anydpi-v26/icon_round.xml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-hdpi/icon.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-hdpi/launcher_foreground.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-mdpi/icon.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-mdpi/launcher_foreground.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-xhdpi/icon.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-xhdpi/launcher_foreground.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-xxhdpi/icon.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-xxhdpi/launcher_foreground.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-xxxhdpi/icon.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/mipmap-xxxhdpi/launcher_foreground.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/values/colors.xml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/values/styles.xml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/AppDelegate.cs create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Contents.json create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon1024.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon120.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon152.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon167.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon180.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon20.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon29.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon40.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon58.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon60.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon76.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon80.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Assets.xcassets/AppIcon.appiconset/Icon87.png rename examples/csharp/HelloworldXamarin/{iOS => HelloworldXamarin.iOS}/Entitlements.plist (99%) create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/HelloworldXamarin.iOS.csproj create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Info.plist create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Main.cs create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Properties/AssemblyInfo.cs create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Resources/Default-568h@2x.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Resources/Default-Portrait.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Resources/Default-Portrait@2x.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Resources/Default.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Resources/Default@2x.png create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Resources/LaunchScreen.storyboard create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/App.xaml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/App.xaml.cs create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/AssemblyInfo.cs create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/HelloworldXamarin.csproj delete mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/HelloworldXamarin.projitems delete mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/HelloworldXamarin.shproj create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/MainPage.xaml create mode 100644 examples/csharp/HelloworldXamarin/HelloworldXamarin/MainPage.xaml.cs delete mode 100644 examples/csharp/HelloworldXamarin/iOS/AppDelegate.cs delete mode 100644 examples/csharp/HelloworldXamarin/iOS/Assets.xcassets/AppIcon.appiconset/Contents.json delete mode 100644 examples/csharp/HelloworldXamarin/iOS/Assets.xcassets/Contents.json delete mode 100644 examples/csharp/HelloworldXamarin/iOS/HelloworldXamarin.iOS.csproj delete mode 100644 examples/csharp/HelloworldXamarin/iOS/Info.plist delete mode 100644 examples/csharp/HelloworldXamarin/iOS/LaunchScreen.storyboard delete mode 100644 examples/csharp/HelloworldXamarin/iOS/Main.cs delete mode 100644 examples/csharp/HelloworldXamarin/iOS/Main.storyboard delete mode 100644 examples/csharp/HelloworldXamarin/iOS/ViewController.cs delete mode 100644 examples/csharp/HelloworldXamarin/iOS/ViewController.designer.cs delete mode 100644 examples/csharp/HelloworldXamarin/iOS/packages.config diff --git a/examples/csharp/HelloworldXamarin/Droid/HelloworldXamarin.Droid.csproj b/examples/csharp/HelloworldXamarin/Droid/HelloworldXamarin.Droid.csproj deleted file mode 100644 index a25dfdf92d0..00000000000 --- a/examples/csharp/HelloworldXamarin/Droid/HelloworldXamarin.Droid.csproj +++ /dev/null @@ -1,103 +0,0 @@ - - - - Debug - AnyCPU - {B9B0D41C-1C07-4590-A919-5865E741B2EA} - {EFBA0AD7-5A72-4C68-AF49-83D382785DCF};{FAE04EC0-301F-11D3-BF4B-00C04F79EFBC} - Library - HelloworldXamarin.Droid - HelloworldXamarin.Droid - v8.1 - True - Resources\Resource.designer.cs - Resource - Properties\AndroidManifest.xml - Resources - Assets - - - - - true - full - false - bin\Debug - DEBUG; - prompt - 4 - None - - - true - pdbonly - true - bin\Release - prompt - 4 - true - false - - - - ..\packages\Google.Protobuf.3.8.0\lib\netstandard2.0\Google.Protobuf.dll - - - ..\packages\Grpc.Core.2.23.0\lib\netstandard2.0\Grpc.Core.dll - - - ..\packages\Grpc.Core.Api.2.23.0\lib\netstandard2.0\Grpc.Core.Api.dll - - - - ..\packages\System.Buffers.4.4.0\lib\netstandard2.0\System.Buffers.dll - - - ..\packages\System.Memory.4.5.3\lib\netstandard2.0\System.Memory.dll - - - ..\packages\System.Runtime.CompilerServices.Unsafe.4.5.2\lib\netstandard2.0\System.Runtime.CompilerServices.Unsafe.dll - - - - - - - - ..\packages\System.Runtime.Loader.4.0.0\lib\netstandard1.5\System.Runtime.Loader.dll - - - ..\packages\System.Interactive.Async.3.1.1\lib\netstandard1.3\System.Interactive.Async.dll - - - - - - - - - - - - - - - - - - - - - - - - - - - - - This project references NuGet package(s) that are missing on this computer. Use NuGet Package Restore to download them. For more information, see http://go.microsoft.com/fwlink/?LinkID=322105. The missing file is {0}. - - - - \ No newline at end of file diff --git a/examples/csharp/HelloworldXamarin/Droid/MainActivity.cs b/examples/csharp/HelloworldXamarin/Droid/MainActivity.cs deleted file mode 100644 index 41f4e85e289..00000000000 --- a/examples/csharp/HelloworldXamarin/Droid/MainActivity.cs +++ /dev/null @@ -1,84 +0,0 @@ -#region Copyright notice and license - -// Copyright 2018 The gRPC Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#endregion - -using Android.App; -using Android.Widget; -using Android.OS; -using System.Threading.Tasks; -using Grpc.Core; -using Helloworld; - -namespace HelloworldXamarin.Droid -{ - [Activity(Label = "HelloworldXamarin", MainLauncher = true, Icon = "@mipmap/icon")] - public class MainActivity : Activity - { - const int Port = 30051; - int count = 1; - - protected override void OnCreate(Bundle savedInstanceState) - { - base.OnCreate(savedInstanceState); - - // Set our view from the "main" layout resource - SetContentView(Resource.Layout.Main); - - // Get our button from the layout resource, - // and attach an event to it - Button button = FindViewById - - - - - - - - - - - - - - - - diff --git a/examples/csharp/HelloworldXamarin/iOS/ViewController.cs b/examples/csharp/HelloworldXamarin/iOS/ViewController.cs deleted file mode 100644 index 37c0c55d22e..00000000000 --- a/examples/csharp/HelloworldXamarin/iOS/ViewController.cs +++ /dev/null @@ -1,91 +0,0 @@ -#region Copyright notice and license - -// Copyright 2018 The gRPC Authors -// -// Licensed under the Apache License, Version 2.0 (the "License"); -// you may not use this file except in compliance with the License. -// You may obtain a copy of the License at -// -// http://www.apache.org/licenses/LICENSE-2.0 -// -// Unless required by applicable law or agreed to in writing, software -// distributed under the License is distributed on an "AS IS" BASIS, -// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. -// See the License for the specific language governing permissions and -// limitations under the License. - -#endregion - -using System; -using System.Threading.Tasks; - -using Grpc.Core; -using Helloworld; - -using UIKit; - -namespace HelloworldXamarin.iOS -{ - public partial class ViewController : UIViewController - { - const int Port = 30051; - int count = 1; - - public ViewController(IntPtr handle) : base(handle) - { - } - - public override void ViewDidLoad() - { - base.ViewDidLoad(); - - // Perform any additional setup after loading the view, typically from a nib. - Button.AccessibilityIdentifier = "myButton"; - Button.TouchUpInside += delegate - { - var title = SayHello(); - Button.SetTitle(title, UIControlState.Normal); - }; - } - - public override void DidReceiveMemoryWarning() - { - base.DidReceiveMemoryWarning(); - // Release any cached data, images, etc that aren't in use. - } - - private string SayHello() - { - Server server = new Server - { - Services = { Greeter.BindService(new GreeterImpl()) }, - Ports = { new ServerPort("localhost", Port, ServerCredentials.Insecure) } - }; - server.Start(); - - Channel channel = new Channel("localhost:30051", ChannelCredentials.Insecure); - - var client = new Greeter.GreeterClient(channel); - string user = "Xamarin " + count; - - var reply = client.SayHello(new HelloRequest { Name = user }); - - channel.ShutdownAsync().Wait(); - server.ShutdownAsync().Wait(); - - count++; - - return "Greeting: " + reply.Message; - } - - - class GreeterImpl : Greeter.GreeterBase - { - // Server side handler of the SayHello RPC - public override Task SayHello(HelloRequest request, ServerCallContext context) - { - return Task.FromResult(new HelloReply { Message = "Hello " + request.Name }); - } - } - } -} diff --git a/examples/csharp/HelloworldXamarin/iOS/ViewController.designer.cs b/examples/csharp/HelloworldXamarin/iOS/ViewController.designer.cs deleted file mode 100644 index 2677a068dca..00000000000 --- a/examples/csharp/HelloworldXamarin/iOS/ViewController.designer.cs +++ /dev/null @@ -1,25 +0,0 @@ -// -// This file has been generated automatically by MonoDevelop to store outlets and -// actions made in the Xcode designer. If it is removed, they will be lost. -// Manual changes to this file may not be handled correctly. -// -using Foundation; - -namespace HelloworldXamarin.iOS -{ - [Register("ViewController")] - partial class ViewController - { - [Outlet] - UIKit.UIButton Button { get; set; } - - void ReleaseDesignerOutlets() - { - if (Button != null) - { - Button.Dispose(); - Button = null; - } - } - } -} diff --git a/examples/csharp/HelloworldXamarin/iOS/packages.config b/examples/csharp/HelloworldXamarin/iOS/packages.config deleted file mode 100644 index 80802a8d124..00000000000 --- a/examples/csharp/HelloworldXamarin/iOS/packages.config +++ /dev/null @@ -1,58 +0,0 @@ - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - - \ No newline at end of file From 7b694fc85dfc0eaab8fc04d7991dbb9fb83d83e2 Mon Sep 17 00:00:00 2001 From: Jan Tattermusch Date: Fri, 16 Oct 2020 17:30:36 +0200 Subject: [PATCH 2/2] add copyright headers to Xamarin example --- .../HelloworldXamarin.Android/MainActivity.cs | 18 ++++++++++++++++- .../Properties/AssemblyInfo.cs | 20 +++++++++++++++++-- .../Resources/Resource.designer.cs | 16 +++++++++++++++ .../HelloworldXamarin.iOS/AppDelegate.cs | 18 ++++++++++++++++- .../HelloworldXamarin.iOS/Main.cs | 18 ++++++++++++++++- .../Properties/AssemblyInfo.cs | 20 +++++++++++++++++-- .../HelloworldXamarin/App.xaml.cs | 18 ++++++++++++++++- .../HelloworldXamarin/AssemblyInfo.cs | 16 +++++++++++++++ .../HelloworldXamarin/MainPage.xaml.cs | 18 ++++++++++++++++- 9 files changed, 153 insertions(+), 9 deletions(-) diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/MainActivity.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/MainActivity.cs index 34027b51815..efe7cf5a504 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/MainActivity.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/MainActivity.cs @@ -1,4 +1,20 @@ -using System; +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + +using System; using Android.App; using Android.Content.PM; diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Properties/AssemblyInfo.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Properties/AssemblyInfo.cs index f9db30c42c7..ec1149ee64e 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Properties/AssemblyInfo.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Properties/AssemblyInfo.cs @@ -1,4 +1,20 @@ -using System.Reflection; +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; using Android.App; @@ -11,7 +27,7 @@ using Android.App; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("HelloworldXamarin.Android")] -[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] [assembly: ComVisible(false)] diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/Resource.designer.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/Resource.designer.cs index 053852c21b2..23236aea901 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/Resource.designer.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin.Android/Resources/Resource.designer.cs @@ -1,3 +1,19 @@ +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + #pragma warning disable 1591 //------------------------------------------------------------------------------ // diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/AppDelegate.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/AppDelegate.cs index 58b5e0a6130..4adb6aeb345 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/AppDelegate.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/AppDelegate.cs @@ -1,4 +1,20 @@ -using System; +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + +using System; using System.Collections.Generic; using System.Linq; diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Main.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Main.cs index 76b1598577f..7e826fb8ce8 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Main.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Main.cs @@ -1,4 +1,20 @@ -using System; +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + +using System; using System.Collections.Generic; using System.Linq; diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Properties/AssemblyInfo.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Properties/AssemblyInfo.cs index 2228b4e35ea..8cc293a2ed1 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Properties/AssemblyInfo.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin.iOS/Properties/AssemblyInfo.cs @@ -1,4 +1,20 @@ -using System.Reflection; +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + +using System.Reflection; using System.Runtime.CompilerServices; using System.Runtime.InteropServices; @@ -10,7 +26,7 @@ using System.Runtime.InteropServices; [assembly: AssemblyConfiguration("")] [assembly: AssemblyCompany("")] [assembly: AssemblyProduct("HelloworldXamarin.iOS")] -[assembly: AssemblyCopyright("Copyright © 2014")] +[assembly: AssemblyCopyright("Copyright © 2020")] [assembly: AssemblyTrademark("")] [assembly: AssemblyCulture("")] diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin/App.xaml.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin/App.xaml.cs index e00af151c40..9ae7a8cb672 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin/App.xaml.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin/App.xaml.cs @@ -1,4 +1,20 @@ -using System; +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + +using System; using Xamarin.Forms; using Xamarin.Forms.Xaml; diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin/AssemblyInfo.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin/AssemblyInfo.cs index c859952e34b..b41074c1b7d 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin/AssemblyInfo.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin/AssemblyInfo.cs @@ -1,3 +1,19 @@ +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + using Xamarin.Forms.Xaml; [assembly: XamlCompilation(XamlCompilationOptions.Compile)] \ No newline at end of file diff --git a/examples/csharp/HelloworldXamarin/HelloworldXamarin/MainPage.xaml.cs b/examples/csharp/HelloworldXamarin/HelloworldXamarin/MainPage.xaml.cs index 411896033f1..de4f63de028 100644 --- a/examples/csharp/HelloworldXamarin/HelloworldXamarin/MainPage.xaml.cs +++ b/examples/csharp/HelloworldXamarin/HelloworldXamarin/MainPage.xaml.cs @@ -1,4 +1,20 @@ -using System; +#region Copyright notice and license +// Copyright 2020 The gRPC Authors +// +// Licensed under the Apache License, Version 2.0 (the "License"); +// you may not use this file except in compliance with the License. +// You may obtain a copy of the License at +// +// http://www.apache.org/licenses/LICENSE-2.0 +// +// Unless required by applicable law or agreed to in writing, software +// distributed under the License is distributed on an "AS IS" BASIS, +// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. +// See the License for the specific language governing permissions and +// limitations under the License. +#endregion + +using System; using System.Collections.Generic; using System.ComponentModel; using System.Linq;