/// <summary> /// Returns an extension registered to this ActorSystem /// </summary> public object GetExtension(IExtensionId extensionId) { object extension; _extensions.TryGetValue(extensionId.ExtensionType, out extension); return(extension); }
/// <summary> /// Retrieves the specified extension that is registered to this actor system. /// </summary> /// <param name="extensionId">The extension to retrieve</param> /// <returns>The specified extension registered to this actor system</returns> public override object GetExtension(IExtensionId extensionId) { object extension; TryGetExtension(extensionId.ExtensionType, out extension); return(extension); }
/// <summary> /// Registers the specified extension with this actor system. /// </summary> /// <param name="extension">The extension to register with this actor system</param> /// <returns>The extension registered with this actor system</returns> public override object RegisterExtension(IExtensionId extension) { if (extension == null) { return(null); } _extensions.GetOrAdd(extension.ExtensionType, t => new Lazy <object>(() => extension.CreateExtension(this), LazyThreadSafetyMode.ExecutionAndPublication)); return(extension.Get(this)); }
public override object RegisterExtension(IExtensionId extension) { if (extension == null) { return(null); } if (!_extensions.ContainsKey(extension.ExtensionType)) { _extensions.TryAdd(extension.ExtensionType, new Lazy <object>(() => extension.CreateExtension(this))); } return(extension.Get(this)); }
/// <summary> /// Registers a new extensionBase to the ActorSystem /// </summary> /// <param name="extensionBase">The extensionBase to register</param> public object RegisterExtension(IExtensionId extensionBase) { if (extensionBase == null) { return(null); } if (!_extensions.ContainsKey(extensionBase.ExtensionType)) { _extensions.TryAdd(extensionBase.ExtensionType, extensionBase.CreateExtension(this)); } return(extensionBase.Get(this)); }
/// <summary> /// Registers the specified extension with this actor system. /// </summary> /// <param name="extension">The extension to register with this actor system</param> /// <returns>The extension registered with this actor system</returns> public abstract object RegisterExtension(IExtensionId extension);
/// <summary> /// Retrieves the specified extension that is registered to this actor system. /// </summary> /// <param name="extensionId">The extension to retrieve</param> /// <returns>The specified extension registered to this actor system</returns> public abstract object GetExtension(IExtensionId extensionId);
/// <summary> /// Returns an extension registered to this ActorSystem /// </summary> public object GetExtension(IExtensionId extensionId) { return(_actorSystem.GetExtension(extensionId)); }
public object RegisterExtension(IExtensionId extension) { return(_actorSystem.RegisterExtension(extension)); }