示例#1
0
        /// <summary>
        /// Create a new LegacyGrainId object by parsing string in a standard form returned from <c>ToParsableString</c> method.
        /// </summary>
        /// <param name="grainId">String containing the LegacyGrainId info to be parsed.</param>
        /// <returns>New LegacyGrainId object created from the input data.</returns>
        internal static LegacyGrainId FromParsableString(ReadOnlySpan <char> grainId)
        {
            // NOTE: This function must be the "inverse" of ToParsableString, and data must round-trip reliably.

            var key = UniqueKey.Parse(grainId);

            return(FindOrCreateGrainId(key));
        }
示例#2
0
        /// <summary>
        /// Create a new GrainId object by parsing string in a standard form returned from <c>ToParsableString</c> method.
        /// </summary>
        /// <param name="addr">String containing the GrainId info to be parsed.</param>
        /// <returns>New GrainId object created from the input data.</returns>
        internal static GrainId FromParsableString(string str)
        {
            // NOTE: This function must be the "inverse" of ToParsableString, and data must round-trip reliably.

            var key = UniqueKey.Parse(str);

            return(FindOrCreateGrainId(key));
        }