Wrap() static private method

static private Wrap ( Stream s ) : InputStream
s Stream
return InputStream
Exemplo n.º 1
0
        public static InputStream GetResourceAsStream(this Type type, string name)
        {
            string str2 = type.Assembly.GetName().Name + ".resources";

            string[] textArray1             = { str2, ".", type.Namespace, ".", name };
            string   str                    = string.Concat(textArray1);
            Stream   manifestResourceStream = type.Assembly.GetManifestResourceStream(str);

            if (manifestResourceStream == null)
            {
                return(null);
            }
            return(InputStream.Wrap(manifestResourceStream));
        }