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

HasSet() public method

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

Usage Example

Example #1
0
        protected override Expression DoResolve(ResolveContext rc)
        {
            if (rc.HasSet(ResolveContext.Options.LockScope))
            {
                rc.Report.Error(1996, loc,
                                "The `await' operator cannot be used in the body of a lock statement");
            }

            if (rc.IsUnsafe)
            {
                rc.Report.Error(4004, loc,
                                "The `await' operator cannot be used in an unsafe context");
            }

            var bc = (BlockContext)rc;

            stmt = new AwaitStatement(expr, loc);
            if (!stmt.Resolve(bc))
            {
                return(null);
            }

            if (rc.HasSet(ResolveContext.Options.FinallyScope) && rc.CurrentAnonymousMethod != null)
            {
                var ats = (AsyncTaskStorey)rc.CurrentAnonymousMethod.Storey;
                ats.HasAwaitInsideFinally = true;
            }

            type   = stmt.ResultType;
            eclass = ExprClass.Variable;
            return(this);
        }
All Usage Examples Of Mono.CSharp.ResolveContext::HasSet