コード例 #1
0
ファイル: XRefAuthority.cs プロジェクト: AArnott/dotnetxri
        bool doScan(ParseStream oStream)
        {
            if (oStream.empty())
            {
                return false;
            }

            ParseStream oTempStream = oStream.begin();

            // make sure we have a valid XRI Value
            XRef oXRef = new XRef();
            if (!oXRef.scan(oTempStream))
            {
                return false;
            }

            // at this point, we know we have enough for a valid xref
            oStream.end(oTempStream);
            moXRoot = oXRef;

            // the cross-reference MAY be followed by an XRI Segment
            // where the star cannot be assumed
            XRISegment oSegment = new XRISegment(false, true, true);
            if (oSegment.scan(oStream))
            {
                moSegment = oSegment;
            }

            return true;
        }
コード例 #2
0
ファイル: GCSAuthority.cs プロジェクト: AArnott/dotnetxri
        /// <summary>
        /// Parses the input stream into the obj
        /// </summary>
        /// <param name="oStream">The input stream to scan from</param>
        /// <returns>True if part of the Stream was consumed into the obj</returns>
        bool doScan(ParseStream oStream)
        {
            if (!scanGCSChar(oStream))
            {
                return false;
            }

            // read in a segment, but bail if it isn't persistent in the ! namespace
            XRISegment oSegment = new XRISegment(true, true, !msGCSRoot.Equals("!"));
            if (oSegment.scan(oStream))
            {
                moSegment = oSegment;
            }

            return true;
        }