PluginFramework.AddIn.Core.Framework.GetNextServiceId C# (CSharp) Méthode

GetNextServiceId() public méthode

public GetNextServiceId ( ) : int
Résultat int
        public int GetNextServiceId()
        {
            int serviceId = this.serviceId;
            serviceId++;
            return serviceId;
        }

Usage Example

        public ServiceRegistration(BundleContext context, string[] classes,
            object serviceObject, Dictionary<string, object> properties)
        {
            this.context = context;
            this.bundle = context.Bundle;
            this.framework = context.Framework;
            this.classes = classes;
            this.serviceObject = serviceObject;
            this.serviceId = framework.GetNextServiceId();
            this.referance = new ServiceReference(this, bundle);
            this.contextsUsing = null;
            this.factory = serviceObject as IServiceFactory;
            available = true;
            InitializeProperties(properties);

            framework.ServiceRegistry.PublishService(context, this);

            EventManager.OnServiceChanged(new ServiceEventArgs(ServiceState.Registered, referance));
        }