示例#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;
 }