Mono.CSharp.ResolveContext.HasAny C# (CSharp) Method

HasAny() public method

public HasAny ( Options options ) : bool
options Options
return bool
		public bool HasAny (Options options)
		{
			return (this.flags & options) != 0;
		}

Usage Example

Example #1
0
		protected override Expression DoResolve (ResolveContext rc)
		{
			if (rc.HasSet (ResolveContext.Options.ConstantScope)) {
				rc.Report.Error (1706, loc, "Anonymous methods and lambda expressions cannot be used in the current context");
				return null;
			}

			//
			// Update top-level block generated duting parsing with actual top-level block
			//
			if (rc.HasAny (ResolveContext.Options.FieldInitializerScope | ResolveContext.Options.BaseInitializer) && rc.CurrentMemberDefinition.Parent.PartialContainer.PrimaryConstructorParameters != null) {
				var tb = rc.ConstructorBlock.ParametersBlock.TopBlock;
				if (Block.TopBlock != tb) {
					Block b = Block;
					while (b.Parent != Block.TopBlock && b != Block.TopBlock)
						b = b.Parent;

					b.Parent = tb;
					tb.IncludeBlock (Block, Block.TopBlock);
					b.ParametersBlock.TopBlock = tb;
				}
			}

			eclass = ExprClass.Value;

			//
			// This hack means `The type is not accessible
			// anywhere', we depend on special conversion
			// rules.
			// 
			type = InternalType.AnonymousMethod;

			if (!DoResolveParameters (rc))
				return null;

			return this;
		}
All Usage Examples Of Mono.CSharp.ResolveContext::HasAny