private StatusInfoAttribute[] PrepareStatusMetadata(StatusInfoAttribute[] serverStatusMetadata) { if (!StatusMetadataExtended) return serverStatusMetadata; var additionalAttrs = this.GetType() .GetCustomAttributes(typeof(StatusInfoAttribute), true) .OfType<StatusInfoAttribute>() .ToArray(); if (additionalAttrs.Length == 0) return serverStatusMetadata; var list = serverStatusMetadata.ToList(); list.AddRange(additionalAttrs); return list.ToArray(); }
/// <summary> /// Creates the work item instance. /// </summary> /// <param name="serviceTypeName">Name of the service type.</param> /// <param name="serverStatusMetadata">The server status metadata.</param> /// <returns></returns> protected virtual IWorkItem CreateWorkItemInstance(string serviceTypeName, StatusInfoAttribute[] serverStatusMetadata) { var serviceType = Type.GetType(serviceTypeName, true); return Activator.CreateInstance(serviceType) as IWorkItem; }
void BuildGridColumns(StatusInfoAttribute[] nodeAttributes, StatusInfoAttribute[] fieldAttributes) { m_NodeDetailAttributes = nodeAttributes; m_ColumnAttributes = fieldAttributes.OrderBy(a => a.Order).ToArray(); }
protected override IWorkItem CreateWorkItemInstance(string serviceTypeName, StatusInfoAttribute[] serverStatusMetadata) { return new AppDomainAppServer(serviceTypeName, serverStatusMetadata); }
/// <summary> /// Initializes a new instance of the <see cref="AppDomainAppServer" /> class. /// </summary> /// <param name="serverTypeName">Name of the server type.</param> /// <param name="serverStatusMetadata">The server status metadata.</param> public AppDomainAppServer(string serverTypeName, StatusInfoAttribute[] serverStatusMetadata) : base(serverTypeName, serverStatusMetadata) { }
protected IsolationAppServer(string serverTypeName, StatusInfoAttribute[] serverStatusMetadata) { State = ServerState.NotInitialized; ServerTypeName = serverTypeName; m_ServerStatusMetadata = PrepareStatusMetadata(serverStatusMetadata); }
/// <summary> /// Initializes a new instance of the <see cref="ProcessAppServer" /> class. /// </summary> /// <param name="serverTypeName">Name of the server type.</param> /// <param name="serverStatusMetadata">The server status metadata.</param> public ProcessAppServer(string serverTypeName, StatusInfoAttribute[] serverStatusMetadata) : base(serverTypeName, serverStatusMetadata) { }