ICSharpCode.NRefactory.MonoCSharp.Arguments.FlowAnalysis C# (CSharp) Method

FlowAnalysis() public method

public FlowAnalysis ( FlowAnalysisContext fc, List movable = null ) : void
fc FlowAnalysisContext
movable List
return void
		public virtual void FlowAnalysis (FlowAnalysisContext fc, List<MovableArgument> movable = null)
		{
			bool has_out = false;
			foreach (var arg in args) {
				if (arg.ArgType == Argument.AType.Out) {
					has_out = true;
					continue;
				}

				if (movable == null) {
					arg.FlowAnalysis (fc);
					continue;
				}

				var ma = arg as MovableArgument;
				if (ma != null && !movable.Contains (ma))
					arg.FlowAnalysis (fc);
			}

			if (!has_out)
				return;

			foreach (var arg in args) {
				if (arg.ArgType != Argument.AType.Out)
					continue;

				arg.FlowAnalysis (fc);
			}
		}

Usage Example

Example #1
0
 public override void FlowAnalysis(FlowAnalysisContext fc)
 {
     InstanceExpr.FlowAnalysis(fc);
     if (arguments != null)
     {
         arguments.FlowAnalysis(fc);
     }
 }
All Usage Examples Of ICSharpCode.NRefactory.MonoCSharp.Arguments::FlowAnalysis