コード例 #1
0
ファイル: IsolationAppServer.cs プロジェクト: yinlei/GF.Core
        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();
        }
コード例 #2
0
ファイル: DefaultBootstrap.cs プロジェクト: zesus19/c5.v1
 /// <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;
 }
コード例 #3
0
 void BuildGridColumns(StatusInfoAttribute[] nodeAttributes, StatusInfoAttribute[] fieldAttributes)
 {
     m_NodeDetailAttributes = nodeAttributes;
     m_ColumnAttributes = fieldAttributes.OrderBy(a => a.Order).ToArray();
 }
コード例 #4
0
 protected override IWorkItem CreateWorkItemInstance(string serviceTypeName, StatusInfoAttribute[] serverStatusMetadata)
 {
     return new AppDomainAppServer(serviceTypeName, serverStatusMetadata);
 }
コード例 #5
0
        /// <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)
        {

        }
コード例 #6
0
ファイル: IsolationAppServer.cs プロジェクト: yinlei/GF.Core
 protected IsolationAppServer(string serverTypeName, StatusInfoAttribute[] serverStatusMetadata)
 {
     State = ServerState.NotInitialized;
     ServerTypeName = serverTypeName;
     m_ServerStatusMetadata = PrepareStatusMetadata(serverStatusMetadata);
 }
コード例 #7
0
 /// <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)
 {
 }