Exemplo n.º 1
0
        public global::System.Collections.Generic.IEnumerable <global::System.IO.Stream> LoadModelFragments()
        {
            global::System.Reflection.Assembly assembly = global::System.Reflection.Assembly.GetExecutingAssembly();
            global::System.Collections.Generic.List <global::System.IO.Stream> streams = new global::System.Collections.Generic.List <global::System.IO.Stream>();

            foreach (string resourceName in assembly.GetManifestResourceNames())
            {
                if (resourceName.EndsWith(".lsml", global::System.StringComparison.OrdinalIgnoreCase))
                {
                    streams.Add(assembly.GetManifestResourceStream(resourceName));
                }
            }

            return(streams);
        }
Exemplo n.º 2
0
        public global::System.Resources.ResourceManager GetModelResourceManager()
        {
            if (resourceManagerChecked == false)
            {
                global::System.Reflection.Assembly assembly = global::System.Reflection.Assembly.GetExecutingAssembly();

                foreach (string resourceName in assembly.GetManifestResourceNames())
                {
                    if (resourceName.EndsWith("Client.resources", global::System.StringComparison.OrdinalIgnoreCase))
                    {
                        string resxName = resourceName.Substring(0, resourceName.Length - ".resources".Length);
                        resourceManager = new global::System.Resources.ResourceManager(resxName, assembly);
                        break;
                    }
                }
                resourceManagerChecked = true;
            }

            return(resourceManager);
        }