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


C# ClassEmitter.DefineCustomAttributeFor方法代码示例

本文整理汇总了C#中Castle.DynamicProxy.Generators.Emitters.ClassEmitter.DefineCustomAttributeFor方法的典型用法代码示例。如果您正苦于以下问题:C# ClassEmitter.DefineCustomAttributeFor方法的具体用法?C# ClassEmitter.DefineCustomAttributeFor怎么用?C# ClassEmitter.DefineCustomAttributeFor使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在Castle.DynamicProxy.Generators.Emitters.ClassEmitter的用法示例。


在下文中一共展示了ClassEmitter.DefineCustomAttributeFor方法的9个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。

示例1: CreateTargetField

		private FieldReference CreateTargetField(ClassEmitter emitter)
		{
			var targetField = emitter.CreateField("__target", targetType);
#if FEATURE_SERIALIZATION
			emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(targetField);
#endif
			return targetField;
		}
开发者ID:elevine,项目名称:Core,代码行数:8,代码来源:DelegateProxyGenerator.cs

示例2: CreateTargetField

		private FieldReference CreateTargetField(ClassEmitter emitter)
		{
			var targetField = emitter.CreateField("__target", targetType);
#if !SILVERLIGHT
			emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(targetField);
#endif
			return targetField;
		}
开发者ID:leloulight,项目名称:Core,代码行数:8,代码来源:DelegateProxyGenerator.cs

示例3: BuildMethodInterceptorsField

		protected FieldReference BuildMethodInterceptorsField(ClassEmitter @class, MethodInfo method, INamingScope namingScope)
		{
			var methodInterceptors = @class.CreateField(
				namingScope.GetUniqueName(string.Format("interceptors_{0}", method.Name)),
				typeof(IInterceptor[]),
				false);
#if !SILVERLIGHT
			@class.DefineCustomAttributeFor<XmlIgnoreAttribute>(methodInterceptors);
#endif
			return methodInterceptors;
		}
开发者ID:AndreKraemer,项目名称:Castle.Core,代码行数:11,代码来源:MethodWithInvocationGenerator.cs

示例4: CreateFields

        protected override void CreateFields(ClassEmitter emitter)
        {
            base.CreateFields(emitter);

            var interceptorsField = emitter.GetField(InterceptorsFieldName);
            if (interceptorsField != null)
            {
                emitter.DefineCustomAttributeFor<IgnoreDataMemberAttribute>(interceptorsField);

                CreateMetadataProperty(emitter, interceptorsField);
            }
        }
开发者ID:RossMerr,项目名称:CouchbaseNetLinq,代码行数:12,代码来源:DocumentProxyGenerator.cs

示例5: CreateInterceptorsField

		protected void CreateInterceptorsField(ClassEmitter emitter)
		{
			var interceptorsField = emitter.CreateField("__interceptors", typeof (IInterceptor[]));

#if !SILVERLIGHT
			emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(interceptorsField);
#endif
		}
开发者ID:AGiorgetti,项目名称:Castle.Core,代码行数:8,代码来源:BaseProxyGenerator.cs

示例6: CreateFields

		private void CreateFields(ClassEmitter emitter, Type proxyTargetType)
		{
			base.CreateFields(emitter);
			targetField = emitter.CreateField("__target", proxyTargetType);

			emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(targetField);
		}
开发者ID:ThatExtraBit,项目名称:Castle.Core,代码行数:7,代码来源:InterfaceProxyWithTargetGenerator.cs

示例7: CreateInterceptorsField

		protected void CreateInterceptorsField(ClassEmitter emitter)
		{
			var interceptorsField = emitter.CreateField("__interceptors", typeof(IInterceptor[]));

#if FEATURE_SERIALIZATION
			emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(interceptorsField);
#endif
		}
开发者ID:textmetal,项目名称:main,代码行数:8,代码来源:BaseProxyGenerator.cs

示例8: CreateFields

		private void CreateFields(ClassEmitter emitter, Type proxyTargetType)
		{
			base.CreateFields(emitter);
			targetField = emitter.CreateField("__target", proxyTargetType);
#if FEATURE_SERIALIZATION
			emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(targetField);
#endif
		}
开发者ID:jeremymeng,项目名称:Core,代码行数:8,代码来源:InterfaceProxyWithTargetGenerator.cs

示例9: CreateFields

		private void CreateFields(ClassEmitter emitter, Type proxyTargetType)
		{
			base.CreateFields(emitter);
			targetField = emitter.CreateField("__target", proxyTargetType);

#if SILVERLIGHT
#warning XmlIncludeAttribute is in silverlight, do we want to explore this?
#else
			emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(targetField);
#endif
		}
开发者ID:AGiorgetti,项目名称:Castle.Core,代码行数:11,代码来源:InterfaceProxyWithTargetGenerator.cs


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