internal AbsolutePath GetPathValue(PipFragment arg) { Contract.Requires(arg.FragmentType == PipFragmentType.AbsolutePath); var path = arg.GetPathValue(); m_inputs.Remove(path); return(path); }
private void VerifyNested0(PipFragment fragment) { PipData nestedData = fragment.GetNestedFragmentValue(); XAssert.AreEqual(NumStandardBlockFragments + 1, nestedData.FragmentCount); using (var nestedEnumerator = nestedData.GetEnumerator()) { var localEnumerator = nestedEnumerator; AssertMoveNext(ref localEnumerator, out fragment, PipFragmentType.AbsolutePath); XAssert.AreEqual(m_uniqueEntry0, fragment.GetPathValue()); VerifyStandardBlock(ref localEnumerator); XAssert.IsFalse(localEnumerator.MoveNext()); } }
private IExpression Generate(PipFragment fragment) { switch (fragment.FragmentType) { case PipFragmentType.Invalid: return(Identifier.CreateUndefined()); case PipFragmentType.StringLiteral: return(Generate(fragment.GetStringIdValue())); case PipFragmentType.AbsolutePath: return(Generate(fragment.GetPathValue())); case PipFragmentType.NestedFragment: return(Generate(fragment.GetNestedFragmentValue())); default: throw Contract.AssertFailure($"Unexpected PipFragmentType from PipFragment.FragmentType: {fragment.FragmentType}"); } }
private ObjectInfo PipFragmentInfo(object context, PipFragment pipFrag) { return(pipFrag.FragmentType == PipFragmentType.StringLiteral ? GetObjectInfo(context, pipFrag.GetStringIdValue()) : pipFrag.FragmentType == PipFragmentType.AbsolutePath ? GetObjectInfo(context, pipFrag.GetPathValue()) : pipFrag.FragmentType == PipFragmentType.NestedFragment ? GetObjectInfo(context, pipFrag.GetNestedFragmentValue()) : new ObjectInfo("{invalid}")); }