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


C# CSharp.AnonymousMethodStorey类代码示例

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


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

示例1: MutateHoistedGenericType

		public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
		{
			foreach (Argument a in arguments)
				a.Expr.MutateHoistedGenericType (storey);

			mg.MutateHoistedGenericType (storey);
		}
开发者ID:lewurm,项目名称:benchmarker,代码行数:7,代码来源:expression.cs

示例2: MutateHoistedGenericType

		public override void MutateHoistedGenericType (AnonymousMethodStorey storey)
		{
			expr.MutateHoistedGenericType (storey);
		}
开发者ID:lewurm,项目名称:benchmarker,代码行数:4,代码来源:ecore.cs

示例3: HoistedLocalVariable

		public HoistedLocalVariable (AnonymousMethodStorey storey, LocalVariable local, string name)
			: base (storey, name, local.Type)
		{
		}
开发者ID:rabink,项目名称:mono,代码行数:4,代码来源:anonymous.cs

示例4: HoistedVariable

		protected HoistedVariable (AnonymousMethodStorey storey, Field field)
		{
			this.storey = storey;
			this.field = field;
		}
开发者ID:rabink,项目名称:mono,代码行数:5,代码来源:anonymous.cs

示例5: GetReferencedStoreyField

		//
		// Returns a field which holds referenced storey instance
		//
		Field GetReferencedStoreyField (AnonymousMethodStorey storey)
		{
			if (used_parent_storeys == null)
				return null;

			foreach (StoreyFieldPair sf in used_parent_storeys) {
				if (sf.Storey == storey)
					return sf.Field;
			}

			return null;
		}
开发者ID:rabink,项目名称:mono,代码行数:15,代码来源:anonymous.cs

示例6: AddParentStoreyReference

		public void AddParentStoreyReference (EmitContext ec, AnonymousMethodStorey storey)
		{
			CheckMembersDefined ();

			if (used_parent_storeys == null)
				used_parent_storeys = new List<StoreyFieldPair> ();
			else if (used_parent_storeys.Exists (i => i.Storey == storey))
				return;

			TypeExpr type_expr = storey.CreateStoreyTypeExpression (ec);
			Field f = AddCompilerGeneratedField ("<>f__ref$" + storey.ID, type_expr);
			used_parent_storeys.Add (new StoreyFieldPair (storey, f));
		}
开发者ID:rabink,项目名称:mono,代码行数:13,代码来源:anonymous.cs

示例7: AddCapturedThisField

		public void AddCapturedThisField (EmitContext ec, AnonymousMethodStorey parent)
		{
			TypeExpr type_expr = new TypeExpression (ec.CurrentType, Location);
			Field f = AddCompilerGeneratedField ("$this", type_expr);
			hoisted_this = new HoistedThis (this, f);

			initialize_hoisted_this = true;
			hoisted_this_parent = parent;
		}
开发者ID:erik-kallen,项目名称:NRefactory,代码行数:9,代码来源:anonymous.cs

示例8: ThisInitializer

			public ThisInitializer (HoistedThis hoisted_this, AnonymousMethodStorey parent)
			{
				this.hoisted_this = hoisted_this;
				this.parent = parent;
			}
开发者ID:erik-kallen,项目名称:NRefactory,代码行数:5,代码来源:anonymous.cs

示例9: CreateAnonymousMethodStorey

		//
		// Creates anonymous method storey in current block
		//
		public AnonymousMethodStorey CreateAnonymousMethodStorey (ResolveContext ec)
		{
			//
			// When referencing a variable in iterator storey from children anonymous method
			//
			if (Toplevel.am_storey is IteratorStorey) {
				return Toplevel.am_storey;
			}

			//
			// An iterator has only 1 storey block
			//
			if (ec.CurrentIterator != null)
			    return ec.CurrentIterator.Storey;

			if (am_storey == null) {
				MemberBase mc = ec.MemberContext as MemberBase;
				GenericMethod gm = mc == null ? null : mc.GenericMethod;

				//
				// Creates anonymous method storey for this block
				//
				am_storey = new AnonymousMethodStorey (this, ec.CurrentMemberDefinition.Parent.PartialContainer, mc, gm, "AnonStorey");
			}

			return am_storey;
		}
开发者ID:tgiphil,项目名称:mono,代码行数:30,代码来源:statement.cs

示例10: AnonymousMethodMethod

			public AnonymousMethodMethod (TypeDefinition parent, AnonymousExpression am, AnonymousMethodStorey storey,
							  TypeExpr return_type,
							  Modifiers mod, MemberName name,
							  ParametersCompiled parameters)
				: base (parent, return_type, mod | Modifiers.COMPILER_GENERATED,
						name, parameters, null)
			{
				this.AnonymousMethod = am;
				this.Storey = storey;

				Parent.PartialContainer.Members.Add (this);
				Block = new ToplevelBlock (am.block, parameters);
			}
开发者ID:rabink,项目名称:mono,代码行数:13,代码来源:anonymous.cs

示例11: CreateAnonymousMethodStorey

		//
		// Creates anonymous method storey in current block
		//
		public AnonymousMethodStorey CreateAnonymousMethodStorey (ResolveContext ec)
		{
			//
			// An iterator has only 1 storey block
			//
			if (ec.CurrentIterator != null)
			    return ec.CurrentIterator.Storey;

			//
			// When referencing a variable in iterator storey from children anonymous method
			//
			if (ParametersBlock.am_storey is IteratorStorey) {
				return ParametersBlock.am_storey;
			}

			if (am_storey == null) {
				MemberBase mc = ec.MemberContext as MemberBase;

				//
				// Creates anonymous method storey for this block
				//
				am_storey = new AnonymousMethodStorey (this, ec.CurrentMemberDefinition.Parent.PartialContainer, mc, ec.CurrentTypeParameters, "AnonStorey");
			}

			return am_storey;
		}
开发者ID:alisci01,项目名称:mono,代码行数:29,代码来源:statement.cs

示例12: StoreyFieldPair

			public StoreyFieldPair (AnonymousMethodStorey storey, Field field)
			{
				this.Storey = storey;
				this.Field = field;
			}
开发者ID:rabink,项目名称:mono,代码行数:5,代码来源:anonymous.cs

示例13: HoistedLocalVariable

		public HoistedLocalVariable (AnonymousMethodStorey scope, LocalInfo local, string name)
			: base (scope, name, local.VariableType)
		{
			this.name = local.Name;
		}
开发者ID:pgoron,项目名称:monodevelop,代码行数:5,代码来源:anonymous.cs

示例14: SetNestedStoryParent

		public void SetNestedStoryParent (AnonymousMethodStorey parentStorey)
		{
			Parent = parentStorey;
			spec.IsGeneric = false;
			spec.DeclaringType = parentStorey.CurrentType;
			MemberName.TypeParameters = null;
		}
开发者ID:rabink,项目名称:mono,代码行数:7,代码来源:anonymous.cs

示例15: AnonymousMethodMethod

			public AnonymousMethodMethod (DeclSpace parent, AnonymousExpression am, AnonymousMethodStorey storey,
							  GenericMethod generic, TypeExpr return_type,
							  Modifiers mod, string real_name, MemberName name,
							  ParametersCompiled parameters)
				: base (parent, generic, return_type, mod | Modifiers.COMPILER_GENERATED,
						name, parameters, null)
			{
				this.AnonymousMethod = am;
				this.Storey = storey;
				this.RealName = real_name;

				Parent.PartialContainer.AddMethod (this);
				Block = new ToplevelBlock (am.block, parameters);
			}
开发者ID:nzaugg,项目名称:mono,代码行数:14,代码来源:anonymous.cs


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