Bind.CSharpSpecWriter.WriteMethod C# (CSharp) Method

WriteMethod() private static method

private static WriteMethod ( BindStreamWriter sw, System.Function f ) : void
sw BindStreamWriter
f System.Function
return void
        private static void WriteMethod(BindStreamWriter sw, Function f)
        {
            if (f.Deprecated && Settings.IsEnabled(Settings.Legacy.AddDeprecationWarnings))
            {
                sw.WriteLine("[Obsolete(\"Deprecated in OpenGL {0}\")]", f.DeprecatedVersion);
            }

            if (!f.CLSCompliant)
            {
                sw.WriteLine("[System.CLSCompliant(false)]");
            }

            sw.WriteLine("[AutoGenerated(Category = \"{0}\", Version = \"{1}\", EntryPoint = \"{2}\")]",
                f.Category, f.Version, Settings.FunctionPrefix + f.WrappedDelegate.Name);
            sw.WriteLine("public static ");
            sw.Write(f);
            sw.WriteLine();
        }