当前位置: 首页>>代码示例>>C#>>正文


C# CSharp.Attributes类代码示例

本文整理汇总了C#中Mono.CSharp.Attributes的典型用法代码示例。如果您正苦于以下问题:C# Attributes类的具体用法?C# Attributes怎么用?C# Attributes使用的例子?那么恭喜您, 这里精选的类代码示例或许可以为您提供帮助。


Attributes类属于Mono.CSharp命名空间,在下文中一共展示了Attributes类的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: MethodCore

		public MethodCore (DeclSpace parent, GenericMethod generic,
			FullNamedExpression type, Modifiers mod, Modifiers allowed_mod,
			MemberName name, Attributes attrs, ParametersCompiled parameters)
			: base (parent, generic, type, mod, allowed_mod, name, attrs)
		{
			this.parameters = parameters;
		}
开发者ID:spencerhakim,项目名称:mono,代码行数:7,代码来源:method.cs

示例2: Class

 public Class(TypeContainer parent, MemberName name, Modifiers mod, Attributes attrs)
     : base(parent, name, attrs, MemberKind.Class)
 {
     var accmods = IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE;
     this.ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod, accmods, Location, Report);
     spec = new TypeSpec (Kind, null, this, null, ModFlags);
 }
开发者ID:JoeSGeorge,项目名称:NRefactory,代码行数:7,代码来源:class.cs

示例3: Accessor

 public Accessor(ToplevelBlock b, Modifiers mod, Attributes attrs, ParametersCompiled p, Location loc)
 {
     Block = b;
     Attributes = attrs;
     Location = loc;
     Parameters = p;
     ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod, 0, loc, RootContext.ToplevelTypes.Compiler.Report);
 }
开发者ID:speier,项目名称:shake,代码行数:8,代码来源:property.cs

示例4: FieldBase

		protected FieldBase (DeclSpace parent, FullNamedExpression type, Modifiers mod,
				     Modifiers allowed_mod, MemberName name, Attributes attrs)
			: base (parent, null, type, mod, allowed_mod | Modifiers.ABSTRACT, Modifiers.PRIVATE,
				name, attrs)
		{
			if ((mod & Modifiers.ABSTRACT) != 0)
				Report.Error (681, Location, "The modifier 'abstract' is not valid on fields. Try using a property instead");
		}
开发者ID:stabbylambda,项目名称:mono,代码行数:8,代码来源:field.cs

示例5: Enum

 public Enum(TypeContainer parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, Attributes attrs)
     : base(parent, name, attrs, MemberKind.Enum)
 {
     underlying_type_expr = type;
     var accmods = IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE;
     ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod_flags, accmods, Location, Report);
     spec = new EnumSpec (null, this, null, null, ModFlags);
 }
开发者ID:segaman,项目名称:NRefactory,代码行数:8,代码来源:enum.cs

示例6: Const

		public Const (DeclSpace parent, FullNamedExpression type, string name,
			      Expression expr, int mod_flags, Attributes attrs, Location loc)
			: base (parent, type, mod_flags, AllowedModifiers,
				new MemberName (name, loc), attrs)
		{
			initializer = expr;
			ModFlags |= Modifiers.STATIC;
		}
开发者ID:lewurm,项目名称:benchmarker,代码行数:8,代码来源:const.cs

示例7: Event

        protected Event(DeclSpace parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, Attributes attrs)
            : base(parent, null, type, mod_flags,
				parent.PartialContainer.Kind == MemberKind.Interface ? AllowedModifiersInterface :
				parent.PartialContainer.Kind == MemberKind.Struct ? AllowedModifiersStruct :
				AllowedModifiersClass,
				name, attrs)
        {
        }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:8,代码来源:property.cs

示例8: Class

        public Class(NamespaceEntry ns, DeclSpace parent, MemberName name, Modifiers mod,
			      Attributes attrs)
            : base(ns, parent, name, attrs, MemberKind.Class)
        {
            var accmods = (Parent == null || Parent.Parent == null) ? Modifiers.INTERNAL : Modifiers.PRIVATE;
            this.ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod, accmods, Location, Report);
            spec = new TypeSpec (Kind, null, this, null, ModFlags);
        }
开发者ID:RainsSoft,项目名称:MonoCompilerAsAService,代码行数:8,代码来源:class.cs

示例9: Enum

 public Enum(NamespaceEntry ns, DeclSpace parent, TypeExpr type,
     Modifiers mod_flags, MemberName name, Attributes attrs)
     : base(ns, parent, name, attrs, MemberKind.Enum)
 {
     this.base_type = type;
     var accmods = IsTopLevel ? Modifiers.INTERNAL : Modifiers.PRIVATE;
     ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod_flags, accmods, Location, Report);
     spec = new EnumSpec (null, this, null, null, ModFlags);
 }
开发者ID:speier,项目名称:shake,代码行数:9,代码来源:enum.cs

示例10: EnumMember

		public EnumMember (Enum parent, EnumMember prev_member, string name, Expression expr,
				   Attributes attrs, Location loc)
			: base (parent, new EnumTypeExpr (parent), name, expr, Modifiers.PUBLIC,
				attrs, loc)
		{
			this.ParentEnum = parent;
			this.ValueExpr = expr;
			this.prev_member = prev_member;
		}
开发者ID:calumjiao,项目名称:Mono-Class-Libraries,代码行数:9,代码来源:enum.cs

示例11: TypeContainer

		public TypeContainer (TypeContainer parent, MemberName name, Attributes attrs, MemberKind kind)
			: base (parent, name, attrs)
		{
			this.Kind = kind;
			if (name != null)
				this.Basename = name.Basename;

			defined_names = new Dictionary<string, MemberCore> ();
		}
开发者ID:fvalette,项目名称:mono,代码行数:9,代码来源:class.cs

示例12: Const

        public Const(DeclSpace parent, FullNamedExpression type, string name,
            Expression expr, Modifiers mod_flags, Attributes attrs, Location loc)
            : base(parent, type, mod_flags, AllowedModifiers,
				new MemberName (name, loc), attrs)
        {
            if (expr != null)
                initializer = new ConstInitializer (this, expr);

            ModFlags |= Modifiers.STATIC;
        }
开发者ID:speier,项目名称:shake,代码行数:10,代码来源:const.cs

示例13: Delegate

        public Delegate(TypeContainer parent, FullNamedExpression type, Modifiers mod_flags, MemberName name, ParametersCompiled param_list,
				 Attributes attrs)
            : base(parent, name, attrs, MemberKind.Delegate)
        {
            this.ReturnType = type;
            ModFlags        = ModifiersExtensions.Check (AllowedModifiers, mod_flags,
                               IsTopLevel ? Modifiers.INTERNAL :
                               Modifiers.PRIVATE, name.Location, Report);
            parameters      = param_list;
            spec = new TypeSpec (Kind, null, this, null, ModFlags | Modifiers.SEALED);
        }
开发者ID:svermeulen,项目名称:NRefactory,代码行数:11,代码来源:delegate.cs

示例14: AddAttributes

		public void AddAttributes (Attributes attrs, IMemberContext context)
		{
			if (attrs == null)
				return;

			if (attributes == null)
				attributes = attrs;
			else
				throw new NotImplementedException ();

			attributes.AttachTo (this, context);
		}
开发者ID:alisci01,项目名称:mono,代码行数:12,代码来源:attribute.cs

示例15: Class

        public Class(NamespaceEntry ns, DeclSpace parent, MemberName name, Modifiers mod,
            Attributes attrs)
            : base(ns, parent, name, attrs, MemberKind.Class)
        {
            var accmods = (Parent == null || Parent.Parent == null) ? Modifiers.INTERNAL : Modifiers.PRIVATE;
            this.ModFlags = ModifiersExtensions.Check (AllowedModifiers, mod, accmods, Location, Report);
            spec = new TypeSpec (Kind, null, this, null, ModFlags);

            if (IsStatic && RootContext.Version == LanguageVersion.ISO_1) {
                Report.FeatureIsNotAvailable (Location, "static classes");
            }
        }
开发者ID:speier,项目名称:shake,代码行数:12,代码来源:class.cs


注:本文中的Mono.CSharp.Attributes类示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。