當前位置: 首頁>>代碼示例>>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;未經允許,請勿轉載。