Beispiel #1
0
 //////////////////////////////////////////////////////////////////////////
 public CBundle(long id, string location, CManifest manifest, DateTime lastModified, CSystemBundle systemBundle)
 {
     m_id = id;
     m_location = location;
     m_manifest = manifest;
     m_lastModified = lastModified;
     m_systemBundle = systemBundle;
     m_state = BundleState.INSTALLED;
 }
Beispiel #2
0
        //////////////////////////////////////////////////////////////////////////

        public CBundle(long id, string location, CManifest manifest, DateTime lastModified, CSystemBundle systemBundle)
        {
            m_id           = id;
            m_location     = location;
            m_manifest     = manifest;
            m_lastModified = lastModified;
            m_systemBundle = systemBundle;
            m_state        = BundleState.INSTALLED;
        }
 //////////////////////////////////////////////////////////////////////////
 public CBundleContext(CBundle bundle, CSystemBundle systemBundle)
 {
     m_checker = new StaleReferenceChecker(onStaleRefAccess);
     m_bundle = bundle;
     m_systemBundle = systemBundle;
     m_publishedServices = new List<CServiceRegistration>();
     m_frameworkListeners = new List<IFrameworkListener>();
     m_bundleListeners = new List<IBundleListener>();
     m_serviceListeners = new List<IServiceListener>();
 }
        //////////////////////////////////////////////////////////////////////////

        public CBundleRepository(CSystemBundle systemBundle)
        {
            m_systemBundle      = systemBundle;
            m_bundlesByID       = new Dictionary <long, CBundle>();
            m_bundlesByLocation = new Dictionary <string, CBundle>();

            m_firstFreeID = 1;
            m_bundlesByID.Add(0, systemBundle);
            m_bundlesByLocation.Add(systemBundle.getLocation(), systemBundle);
        }
        //////////////////////////////////////////////////////////////////////////

        public CBundleContext(CBundle bundle, CSystemBundle systemBundle)
        {
            m_checker            = new StaleReferenceChecker(onStaleRefAccess);
            m_bundle             = bundle;
            m_systemBundle       = systemBundle;
            m_publishedServices  = new List <CServiceRegistration>();
            m_frameworkListeners = new List <IFrameworkListener>();
            m_bundleListeners    = new List <IBundleListener>();
            m_serviceListeners   = new List <IServiceListener>();
        }
        //////////////////////////////////////////////////////////////////////////
        public CBundleRepository(CSystemBundle systemBundle)
        {
            m_systemBundle = systemBundle;
            m_bundlesByID = new Dictionary<long, CBundle>();
            m_bundlesByLocation = new Dictionary<string, CBundle>();

            m_firstFreeID = 1;
            m_bundlesByID.Add(0, systemBundle);
            m_bundlesByLocation.Add(systemBundle.getLocation(), systemBundle);
        }
        //////////////////////////////////////////////////////////////////////////
        public IFramework NewFramework(FrameworkConfig configuration)
        {
            if (configuration == null)
                configuration = new FrameworkConfig();

            CManifest manifest = new CManifest();

            manifest.SymbolicName = "Sekai Framework";
            manifest.Version = Assembly.GetExecutingAssembly().GetName().Version;
            manifest.AssemblyPath = Assembly.GetExecutingAssembly().Location;

            CSystemBundle sys_bundle = new CSystemBundle(configuration, manifest);
            return sys_bundle;
        }
 //////////////////////////////////////////////////////////////////////////
 public CServiceRegistry(CSystemBundle systemBundle)
 {
     m_systemBundle = systemBundle;
     m_services = new Dictionary<string, List<CServiceRegistration>>();
 }
        //////////////////////////////////////////////////////////////////////////

        public CServiceRegistry(CSystemBundle systemBundle)
        {
            m_systemBundle = systemBundle;
            m_services     = new Dictionary <string, List <CServiceRegistration> >();
        }