internal static string[] GetEmbeddedResourcePath(Uri resourceUrl) { if (ResourceUrl.ContainsAssemblyLocation(resourceUrl)) { int num = resourceUrl.AbsolutePath.IndexOf(";"); return(resourceUrl.AbsolutePath.Substring(num + 1).Split(new string[] { "/" }, StringSplitOptions.None)); } return((from p in resourceUrl.Segments.Skip(1) select p.Replace("/", "")).ToArray <string>()); }
internal static string GetEmbeddedResourceAssemblyName(Uri resourceUrl) { if (ResourceUrl.ContainsAssemblyLocation(resourceUrl)) { string text = resourceUrl.AbsolutePath.Substring("/assembly:".Length); int length = Math.Max(0, text.IndexOf(";")); return(text.Substring(0, length)); } if (resourceUrl.Segments.Length <= 1) { return(string.Empty); } string text2 = resourceUrl.Segments[1]; if (!text2.EndsWith("/")) { return(text2); } return(text2.Substring(0, text2.Length - "/".Length)); }