コード例 #1
0
            /// <summary>
            ///
            /// </summary>
            /// <param name="acDomain"></param>
            /// <param name="commandType"></param>
            /// <param name="record"></param>
            /// <returns></returns>
            internal static CommandRecord Create(IAcDomain acDomain, MessageTypeKind commandType, System.Data.IDataRecord record)
            {
                MessageType requestType;

                record.GetString(record.GetOrdinal("MessageType")).TryParse(out requestType);
                ClientType clientType;

                record.GetString(record.GetOrdinal("ClientType")).TryParse(out clientType);
                return(new CommandRecord(commandType,
                                         record.GetGuid(record.GetOrdinal("Id")),
                                         DataItemsTuple.Create(
                                             acDomain,
                                             record.GetNullableString("InfoId"),
                                             record.GetNullableString("InfoValue"),
                                             record.GetNullableString("QueryList"),
                                             record.GetString(record.GetOrdinal("InfoFormat"))))
                {
                    Verb = new Verb(record.GetString(record.GetOrdinal("Verb"))),
                    Ontology = record.GetString(record.GetOrdinal("Ontology")),
                    LocalEntityId = record.GetNullableString("LocalEntityId"),
                    CatalogCode = record.GetNullableString("CatalogCode"),
                    ClientId = record.GetString(record.GetOrdinal("ClientId")),
                    TimeStamp = record.GetDateTime(record.GetOrdinal("TimeStamp")),
                    ReceivedOn = record.GetDateTime(record.GetOrdinal("ReceivedOn")),
                    CreateOn = record.GetDateTime(record.GetOrdinal("CreateOn")),
                    ClientType = clientType,
                    MessageType = requestType,
                    MessageId = record.GetString(record.GetOrdinal("MessageId")),
                    Status = record.GetInt32(record.GetOrdinal("Status")),
                    ReasonPhrase = record.GetNullableString(record.GetOrdinal("ReasonPhrase")),
                    Description = record.GetNullableString(record.GetOrdinal("Description")),
                    EventSubjectCode = record.GetNullableString(record.GetOrdinal("EventSubjectCode")),
                    EventSourceType = record.GetNullableString(record.GetOrdinal("EventSourceType")),
                    UserName = record.GetNullableString("UserName"),
                    IsDumb = record.GetBoolean(record.GetOrdinal("IsDumb")),
                    Version = record.GetString(record.GetOrdinal("Version"))
                });
            }