예제 #1
0
 static void AssemblyAdd(
     this D.CodeCompileUnit unit, string name, string value)
 {
     var type = "global::System.Reflection." + name;
     var declaration = new D.CodeAttributeDeclaration(type);
     var expression = new D.CodePrimitiveExpression(value);
     declaration.Arguments.Add(new D.CodeAttributeArgument(expression));
     unit.AssemblyCustomAttributes.Add(declaration);
 }
예제 #2
0
        static void AssemblyAdd(
            this D.CodeCompileUnit unit, string name, string value)
        {
            var type        = "global::System.Reflection." + name;
            var declaration = new D.CodeAttributeDeclaration(type);
            var expression  = new D.CodePrimitiveExpression(value);

            declaration.Arguments.Add(new D.CodeAttributeArgument(expression));
            unit.AssemblyCustomAttributes.Add(declaration);
        }