Example #1
0
        private static void WriteSourceFileHeader(SourceCodeWriter sourceWriter)
        {
            sourceWriter.WriteLine("// Copyright 2016 Google Inc. All Rights Reserved.");
            sourceWriter.WriteLine("// ");
            sourceWriter.WriteLine("// Licensed under the Apache License, Version 2.0 (the \"License\");");
            sourceWriter.WriteLine("// you may not use this file except in compliance with the License.");
            sourceWriter.WriteLine("// You may obtain a copy of the License at");
            sourceWriter.WriteLine("// ");
            sourceWriter.WriteLine("//     http://www.apache.org/licenses/LICENSE-2.0");
            sourceWriter.WriteLine("// ");
            sourceWriter.WriteLine("// Unless required by applicable law or agreed to in writing, software");
            sourceWriter.WriteLine("// distributed under the License is distributed on an \"AS IS\" BASIS,");
            sourceWriter.WriteLine("// WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied.");
            sourceWriter.WriteLine("// See the License for the specific language governing permissions and");
            sourceWriter.WriteLine("// limitations under the License.");
            sourceWriter.WriteLine();

            sourceWriter.WriteLine("// ReSharper disable InconsistentNaming");
            sourceWriter.WriteLine("// ReSharper disable DelegateSubtraction");
            sourceWriter.WriteLine("// ReSharper disable UseObjectOrCollectionInitializer");
            sourceWriter.WriteLine("// ReSharper disable UnusedParameter.Local");
            sourceWriter.WriteLine("// ReSharper disable UnusedMember.Local");
            sourceWriter.WriteLine("// ReSharper disable ConvertIfStatementToConditionalTernaryExpression");

            sourceWriter.AddUsing("System");
            sourceWriter.AddUsing("System.Runtime.InteropServices");
            sourceWriter.AddUsing("System.Text");
            sourceWriter.AddUsing("WindowHandle = System.IntPtr");
            sourceWriter.AddUsing("BOOL = System.Int32");
            sourceWriter.WriteLine();
        }