コード例 #1
0
        public IExportedNamespace[] GetExportedNamespaces(Physalis.Specs.Framework.IBundle bundle)
        {
            Namespaces  namespaces = Framework.Instance.Namespaces;
            ICollection list       = namespaces.GetNamespacesProvidedBy(bundle);
            int         size       = list.Count;

            if (size > 0)
            {
                IExportedNamespace[] res = new IExportedNamespace[size];
                IEnumerator          i   = list.GetEnumerator();
                for (int pos = 0; pos < size;)
                {
                    res[pos++] = new ExportedNamespace((NamespaceEntry)i.Current);
                }
                return(res);
            }
            else
            {
                return(null);
            }
        }
コード例 #2
0
ファイル: Framework.cs プロジェクト: karentamrazyan/Physalis
        public void Intialize()
        {
            services   = new Services();
            storage    = new BundleStorage();
            data       = new DirectoryInfo(DATA_STORAGE);
            namespaces = new Namespaces();
            system     = new SystemBundle();
            bundles    = new Bundles();
            bundles.Install(system);

            services.Register(system,
                              new string [] { typeof(NamespacesAdmin).FullName },
                              new NamespacesAdmin(),
                              null);

//            startLevelService = new StartLevelImpl();
//            services.Register(  system,
//                                new String [] { typeof(StartLevel).FullName },
//                                startLevelService,
//                                null);
//            startLevelService.open();
        }