Avro.CodeGen.AvroGen.createCodeTypeDeclaration C# (CSharp) Метод

createCodeTypeDeclaration() приватный статический Метод

private static createCodeTypeDeclaration ( string name ) : CodeTypeDeclaration
name string
Результат System.CodeDom.CodeTypeDeclaration
        private static CodeTypeDeclaration createCodeTypeDeclaration(string name)
        {
            const string PREFIX = "createCodeTypeDeclaration(string) - ";
            if (log.IsDebugEnabled) log.DebugFormat(PREFIX + "name = \"{0}\"", name);
            if (string.IsNullOrEmpty(name)) throw new ArgumentNullException("name", "name cannot be null.");

            CodeTypeDeclaration typedeclare = new CodeTypeDeclaration(name);
            CodeAttributeDeclaration toolAttribute = new CodeAttributeDeclaration(new CodeTypeReference(typeof(System.CodeDom.Compiler.GeneratedCodeAttribute)));
            toolAttribute.Arguments.Add(new CodeAttributeArgument(new CodePrimitiveExpression(TOOLNAME)));
            toolAttribute.Arguments.Add(new CodeAttributeArgument(new CodePrimitiveExpression(VERSION)));
            typedeclare.CustomAttributes.Add(toolAttribute);
            return typedeclare;
        }