Exemplo n.º 1
0
 /// <summary>
 /// The attach method.
 /// </summary>
 /// <param name="name"></param>
 /// <param name="part"></param>
 public void Attach(string name, IServerPart part)
 {
     if (part != null)
     {
         _attachedParts.Locked((attachedParts) => attachedParts[name] = part);
         //Logger.LogDebug("ServerPart '{0}' attached.", name);
         OnAttached(name, part);
     }
     //else
     //    Logger.LogDebug("ServerPart '{0}' not attached.", name);
 }
Exemplo n.º 2
0
        protected override void OnAttached(string name, IServerPart part)
        {
            switch (name)
            {
            case PartNames.Cache:
                _cacheEngine = (CacheEngine)part;
                break;

            default:
                throw new NotImplementedException($"Unknown part: '{name}'");
            }
        }
Exemplo n.º 3
0
 protected virtual void OnAttached(string name, IServerPart part)
 {
 }