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


C# Emit.MethodBuilder类代码示例

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


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

示例1: PatchCallingConvention

		private void PatchCallingConvention(MethodBuilder mdBuilder)
		{
			if (patchCallingConvention && !mdBuilder.IsStatic)
			{
				sig.HasThis = true;
			}
		}
开发者ID:koush,项目名称:mono,代码行数:7,代码来源:PropertyBuilder.cs

示例2: AddOtherMethod

		public void AddOtherMethod(MethodBuilder mdBuilder)
		{
			Accessor acc;
			acc.Semantics = MethodSemanticsTable.Other;
			acc.Method = mdBuilder;
			accessors.Add(acc);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:7,代码来源:EventBuilder.cs

示例3: SetSetMethod

		public void SetSetMethod(MethodBuilder mdBuilder)
		{
			setter = mdBuilder;
			Accessor acc;
			acc.Semantics = MethodSemanticsTable.Setter;
			acc.Method = mdBuilder;
			accessors.Add(acc);
		}
开发者ID:ngraziano,项目名称:mono,代码行数:8,代码来源:PropertyBuilder.cs

示例4: SetRemoveOnMethod

		public void SetRemoveOnMethod(MethodBuilder mdBuilder)
		{
			removeOnMethod = mdBuilder;
			Accessor acc;
			acc.Semantics = MethodSemanticsTable.RemoveOn;
			acc.Method = mdBuilder;
			accessors.Add(acc);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:8,代码来源:EventBuilder.cs

示例5: SetRaiseMethod

		public void SetRaiseMethod(MethodBuilder mdBuilder)
		{
			fireMethod = mdBuilder;
			Accessor acc;
			acc.Semantics = MethodSemanticsTable.Fire;
			acc.Method = mdBuilder;
			accessors.Add(acc);
		}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:8,代码来源:EventBuilder.cs

示例6: AddOtherMethod

		public void AddOtherMethod(MethodBuilder mdBuilder)
		{
			if (otherMethods == null)
			{
				otherMethods = new List<MethodBuilder>();
			}
			otherMethods.Add(mdBuilder);
		}
开发者ID:koush,项目名称:mono,代码行数:8,代码来源:EventBuilder.cs

示例7: AddOtherMethod

		public void AddOtherMethod(MethodBuilder mdBuilder)
		{
			PatchCallingConvention(mdBuilder);
			if (otherMethods == null)
			{
				otherMethods = new List<MethodBuilder>();
			}
			otherMethods.Add(mdBuilder);
		}
开发者ID:koush,项目名称:mono,代码行数:9,代码来源:PropertyBuilder.cs

示例8: SetParameters

			private static void SetParameters(ClassLoaderWrapper loader, MethodBuilder mb, IKVM.Internal.MapXml.Param[] parameters)
			{
				if(parameters != null)
				{
					for(int i = 0; i < parameters.Length; i++)
					{
						ParameterBuilder pb = mb.DefineParameter(i + 1, ParameterAttributes.None, parameters[i].Name);
						if(parameters[i].Attributes != null)
						{
							for(int j = 0; j < parameters[i].Attributes.Length; j++)
							{
								AttributeHelper.SetCustomAttribute(loader, pb, parameters[i].Attributes[j]);
							}
						}
					}
				}
			}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:17,代码来源:CompilerClassLoader.cs

示例9: CopyLinkDemands

			private static void CopyLinkDemands(MethodBuilder mb, MethodInfo mi)
			{
				foreach (CustomAttributeData cad in CustomAttributeData.__GetDeclarativeSecurity(mi))
				{
					if (cad.ConstructorArguments.Count == 0 || (int)cad.ConstructorArguments[0].Value == (int)SecurityAction.LinkDemand)
					{
						mb.__AddDeclarativeSecurity(cad.__ToBuilder());
					}
				}
			}
开发者ID:jira-sarec,项目名称:ICSE-2012-TraceLab,代码行数:10,代码来源:CompilerClassLoader.cs

示例10: GetSerializationConstructor

 internal MethodBuilder GetSerializationConstructor()
 {
     if (baseSerializationCtor == null)
     {
         baseSerializationCtor = Serialization.AddAutomagicSerializationToWorkaroundBaseClass(typeBuilder, wrapper.BaseTypeWrapper.GetSerializationConstructor());
     }
     return baseSerializationCtor;
 }
开发者ID:T0pp3r,项目名称:ikvm-fork,代码行数:8,代码来源:AotTypeWrapper.cs

示例11: SetRemoveOnMethod

		public void SetRemoveOnMethod(MethodBuilder mdBuilder)
		{
			removeOnMethod = mdBuilder;
		}
开发者ID:koush,项目名称:mono,代码行数:4,代码来源:EventBuilder.cs

示例12: IlProcessor

 public IlProcessor(MethodBuilder builder)
 {
     this.builder = builder;
     this.instructions = new Collection<Instruction>();
 }
开发者ID:Karapuska,项目名称:Totem,代码行数:5,代码来源:ILProcessor.cs

示例13: AddParameterMetadata

 private void AddParameterMetadata(MethodBuilder method, MethodWrapper mw)
 {
     ParameterBuilder[] pbs;
     if((mw.DeclaringType.IsPublic && (mw.IsPublic || mw.IsProtected)) || classLoader.EmitDebugInfo)
     {
         string[] parameterNames = new string[mw.GetParameters().Length];
         GetParameterNamesFromXml(mw.Name, mw.Signature, parameterNames);
         GetParameterNamesFromSig(mw.Signature, parameterNames);
         pbs = GetParameterBuilders(method, parameterNames.Length, parameterNames);
     }
     else
     {
         pbs = GetParameterBuilders(method, mw.GetParameters().Length, null);
     }
     if((mw.Modifiers & Modifiers.VarArgs) != 0 && pbs.Length > 0)
     {
         AttributeHelper.SetParamArrayAttribute(pbs[pbs.Length - 1]);
     }
     AddXmlMapParameterAttributes(method, Name, mw.Name, mw.Signature, ref pbs);
 }
开发者ID:T0pp3r,项目名称:ikvm-fork,代码行数:20,代码来源:AotTypeWrapper.cs

示例14: SetSetMethod

		public void SetSetMethod(MethodBuilder mdBuilder)
		{
			PatchCallingConvention(mdBuilder);
			setter = mdBuilder;
		}
开发者ID:koush,项目名称:mono,代码行数:5,代码来源:PropertyBuilder.cs

示例15: SetAddOnMethod

		public void SetAddOnMethod(MethodBuilder mdBuilder)
		{
			addOnMethod = mdBuilder;
		}
开发者ID:koush,项目名称:mono,代码行数:4,代码来源:EventBuilder.cs


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