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));
}