Artemis.Engine.Utilities.UriTree.UriUtilities.AllButFirstPart C# (CSharp) Method

AllButFirstPart() public static method

Return everything in a Uri except for the first part of the name.
public static AllButFirstPart ( string name ) : string
name string
return string
        public static string AllButFirstPart(string name)
        {
            return new String(name.SkipWhile(c => c != URI_SEPARATOR).Skip(1).ToArray());
        }

Usage Example

        public U GetObservedNode(Dictionary <string, U> observedNodes, string name)
        {
            if (name.Contains(UriUtilities.URI_SEPARATOR))
            {
                var firstPart   = UriUtilities.GetFirstPart(name);
                var allButFirst = UriUtilities.AllButFirstPart(name);

                return(observedNodes[firstPart].GetSubnode(allButFirst));
            }
            return(observedNodes[name]);
        }