本文整理汇总了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;
}
示例2: CreateTargetField
private FieldReference CreateTargetField(ClassEmitter emitter)
{
var targetField = emitter.CreateField("__target", targetType);
#if !SILVERLIGHT
emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(targetField);
#endif
return targetField;
}
示例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;
}
示例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);
}
}
示例5: CreateInterceptorsField
protected void CreateInterceptorsField(ClassEmitter emitter)
{
var interceptorsField = emitter.CreateField("__interceptors", typeof (IInterceptor[]));
#if !SILVERLIGHT
emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(interceptorsField);
#endif
}
示例6: CreateFields
private void CreateFields(ClassEmitter emitter, Type proxyTargetType)
{
base.CreateFields(emitter);
targetField = emitter.CreateField("__target", proxyTargetType);
emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(targetField);
}
示例7: CreateInterceptorsField
protected void CreateInterceptorsField(ClassEmitter emitter)
{
var interceptorsField = emitter.CreateField("__interceptors", typeof(IInterceptor[]));
#if FEATURE_SERIALIZATION
emitter.DefineCustomAttributeFor<XmlIgnoreAttribute>(interceptorsField);
#endif
}
示例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
}
示例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
}