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


C# ParametersCompiled.GetMetaInfo方法代码示例

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


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

示例1: DefineMethodBuilder

		//
		// Creates full MethodBuilder for the method 
		//
		public MethodBuilder DefineMethodBuilder (TypeDefinition container, ParametersCompiled param)
		{
			DefineMethodBuilder (container);
			builder.SetReturnType (method.ReturnType.GetMetaInfo ());
			builder.SetParameters (param.GetMetaInfo ());
			return builder;
		}
开发者ID:OpenFlex,项目名称:playscript-mono,代码行数:10,代码来源:method.cs

示例2: DefineMethodBuilder

		/// <summary>
		/// Create the MethodBuilder for the method 
		/// </summary>
		void DefineMethodBuilder (TypeDefinition container, string method_name, ParametersCompiled param)
		{
			var return_type = method.ReturnType.GetMetaInfo ();
			var p_types = param.GetMetaInfo ();

			if (builder == null) {
				builder = container.TypeBuilder.DefineMethod (
					method_name, flags, method.CallingConventions,
					return_type, p_types);
				return;
			}

			//
			// Generic method has been already defined to resolve method parameters
			// correctly when they use type parameters
			//
			builder.SetParameters (p_types);
			builder.SetReturnType (return_type);
			if (builder.Attributes != flags) {
#if STATIC
				builder.__SetAttributes (flags);
#else
				try {
					if (methodbuilder_attrs_field == null)
						methodbuilder_attrs_field = typeof (MethodBuilder).GetField ("attrs", BindingFlags.NonPublic | BindingFlags.Instance);
					methodbuilder_attrs_field.SetValue (builder, flags);
				} catch {
					container.Compiler.Report.RuntimeMissingSupport (method.Location, "Generic method MethodAttributes");
				}
#endif
			}
		}
开发者ID:Viewserve,项目名称:mono,代码行数:35,代码来源:method.cs

示例3: DefineBuilders

		protected void DefineBuilders (MemberKind kind, ParametersCompiled parameters)
		{
			PropertyBuilder = Parent.TypeBuilder.DefineProperty (
				GetFullName (MemberName), PropertyAttributes.None,
#if !BOOTSTRAP_BASIC	// Requires trunk version mscorlib
				IsStatic ? 0 : CallingConventions.HasThis,
#endif
				MemberType.GetMetaInfo (), null, null,
				parameters.GetMetaInfo (), null, null);

			PropertySpec spec;
			if (kind == MemberKind.Indexer)
				spec = new IndexerSpec (Parent.Definition, this, MemberType, parameters, PropertyBuilder, ModFlags);
			else
				spec = new PropertySpec (kind, Parent.Definition, this, MemberType, PropertyBuilder, ModFlags);

			if (Get != null) {
				spec.Get = Get.Spec;

				var method = Get.Spec.GetMetaInfo () as MethodBuilder;
				if (method != null) {
					PropertyBuilder.SetGetMethod (method);
					Parent.MemberCache.AddMember (this, method.Name, Get.Spec);
				}
			} else {
				CheckMissingAccessor (kind, parameters, true);
			}

			if (Set != null) {
				spec.Set = Set.Spec;

				var method = Set.Spec.GetMetaInfo () as MethodBuilder;
				if (method != null) {
					PropertyBuilder.SetSetMethod (method);
					Parent.MemberCache.AddMember (this, method.Name, Set.Spec);
				}
			} else {
				CheckMissingAccessor (kind, parameters, false);
			}

			Parent.MemberCache.AddMember (this, PropertyBuilder.Name, spec);
		}
开发者ID:bbqchickenrobot,项目名称:playscript-mono,代码行数:42,代码来源:property.cs

示例4: DefineBuilders

        protected void DefineBuilders(MemberKind kind, ParametersCompiled parameters)
        {
            // FIXME - PropertyAttributes.HasDefault ?

            PropertyBuilder = Parent.TypeBuilder.DefineProperty (
                GetFullName (MemberName), PropertyAttributes.None, MemberType.GetMetaInfo (), parameters.GetMetaInfo ());

            PropertySpec spec;
            if (kind == MemberKind.Indexer)
                spec = new IndexerSpec (Parent.Definition, this, MemberType, parameters, PropertyBuilder, ModFlags);
            else
                spec = new PropertySpec (kind, Parent.Definition, this, MemberType, PropertyBuilder, ModFlags);

            spec.Get = Get.Spec;
            spec.Set = Set.Spec;

            if (!Get.IsDummy) {
                PropertyBuilder.SetGetMethod (GetBuilder);
            }

            if (!Set.IsDummy) {
                PropertyBuilder.SetSetMethod (SetBuilder);
            }

            Parent.MemberCache.AddMember (this, Get.IsDummy ? Get.Name : GetBuilder.Name, Get.Spec);
            Parent.MemberCache.AddMember (this, Set.IsDummy ? Set.Name : SetBuilder.Name, Set.Spec);
            Parent.MemberCache.AddMember (this, PropertyBuilder.Name, spec);
        }
开发者ID:speier,项目名称:shake,代码行数:28,代码来源:property.cs


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