System.Collections.Generic.IEnumerable.Contains(Variable)

Here are the examples of the csharp api System.Collections.Generic.IEnumerable.Contains(Variable) taken from open source projects. By voting up you can indicate which examples are most useful and appropriate.

1 Examples 7

19 Source : Frame.cs
with MIT License
from JasperFx

public void ResolveVariables(IMethodVariables method)
        {
            // This has to be idempotent
            if (_hasResolved) return;

            // Filter out created variables because bad, bad Stackoverflow things happen
            // when you don't 
            var variables = FindVariables(method).Where(x => !Creates.Contains(x)).Distinct().ToArray();
            if (variables.Any(x => x == null))
                throw new InvalidOperationException($"Frame {this} could not resolve one of its variables");

            uses.AddRange(variables.Where(x => x != null));

            _hasResolved = true;
        }