예제 #1
0
 public override int StoreLinkages(IEnumerable <AccountToParty> mappings, LinkageDirection dir)
 {
     using (var connection = _sqlTableWithPrimaryKey.NewConnection(connectionString))
     {
         if (dir == LinkageDirection.AccountToParty)
         {
             return(new SqlTableSimpleLinkages().InsertOrUpdateLinkageRows(connection, "AccountParty", "AccountId", "PartyId",
                                                                           mappings.Cast <Object>(),
                                                                           (x) =>
             {
                 var t = (AccountToParty)x;
                 return (t.AccountId, t.PartyId);
             }));
예제 #2
0
        public LoadFromCSV(ClientServicePartitionValidator validator, IClientFactory factory, MyRegistry reg)
        {
            this.factory   = factory;
            this.reg       = reg;
            this.validator = validator;


            dataType = EnumHelper.Parse <DataType>(Helper.Prompt($"Enter type of data - {EnumHelper.ListValues(typeof(DataType))}"));

            if (dataType == DataType.Party)
            {
                partyType = EnumHelper.EnumPrompt <Party.Types.PartyType>();
            }

            if (dataType == DataType.AccountToParty)
            {
                linkageDirection = EnumHelper.EnumPrompt <LinkageDirection>();
            }
        }
예제 #3
0
 public IEnumerable <AccountToParty> GetLinkages(IEnumerable <Identifier> source, LinkageDirection direction)
 {
     return(client.SendEnumerableListResult <Identifier, AccountToParty>("GetLinkages", AccountToParty.Parser.ParseDelimitedFrom, source, direction));
 }
예제 #4
0
 public Int32 StoreLinkages(IEnumerable <AccountToParty> mappings, LinkageDirection direction)
 {
     return(client.SendEnumerableIntResult <AccountToParty>("StoreLinkages", mappings, direction));
 }
예제 #5
0
 public abstract IEnumerable <AccountToParty> GetLinkages(IEnumerable <Identifier> source, LinkageDirection direction);
예제 #6
0
 public abstract Int32 StoreLinkages(IEnumerable <AccountToParty> mappings, LinkageDirection direction);
예제 #7
0
 public AccountToPartyComparer(LinkageDirection dir)
 {
     this.dir = dir;
 }