public void SetRecords(List <Property> records) { for (int i = 0; i < PropertyListAssociations.Count; i++) { PropertyListAssociations[i].SetRecord(records[i]); } ListIdentifier = new AsciiStringReference( string.Join(",", records.Select(r => r.PropertyId))); }
public void SetRecords(List <Attribute> records) { for (int i = 0; i < AttributeLists.Count; i++) { AttributeLists[i].SetRecord(records[i]); } ListIdentifier = new AsciiStringReference( string.Join(",", records.Select(r => r.AttributeId))); }
public void SetRecords(List <Constructor> records) { for (int i = 0; i < ConstructorListAssociations.Count; i++) { ConstructorListAssociations[i].SetRecord(records[i]); } ListIdentifier = new AsciiStringReference( string.Join(",", records.Select(r => r.ConstructorId))); }
public void SetRecords(List <DocumentationComment> records) { for (int i = 0; i < DocumentationComments.Count; i++) { DocumentationComments[i].SetRecord(records[i]); } ListIdentifier = new AsciiStringReference( string.Join(",", records.Select(r => r.DocumentationCommentId))); }
public void SetRecords(List <SyntaxToken> records) { for (int i = 0; i < ModifierListAssociations.Count; i++) { ModifierListAssociations[i].SetRecord(records[i]); } ListIdentifier = new AsciiStringReference( string.Join(",", records.Select(r => r.SyntaxTokenId))); }
public void SetRecords(List <Statement> records) { for (int i = 0; i < StatementListAssociations.Count; i++) { StatementListAssociations[i].SetRecord(records[i]); } ListIdentifier = new AsciiStringReference( string.Join(",", records.Select(r => r.StatementId))); }
public void SetRecords(List <BaseType> records) { for (int i = 0; i < BaseListAssociations.Count; i++) { BaseListAssociations[i].SetRecord(records[i]); } ListIdentifier = new AsciiStringReference( string.Join(",", records.Select(r => r.BaseTypeId))); }
protected override async Task <AsciiMaxStringReference> AssignUpsertedReferences(AsciiMaxStringReference record) { var bytes = new xxHash(64).ComputeHash(Encoding.UTF8.GetBytes(record.Value)); var hash = new AsciiStringReference { Value = Convert.ToBase64String(bytes) }; hash = await _strings.UpsertAsync(hash); record.Hash = hash; record.HashId = hash.AsciiStringReferenceId; return(record); }
public async Task <IMaxStringReference> UpsertComputedHash(IMaxStringReference record) { var hashString = xxHashFactory.Instance.Create().ComputeHash(Encoding.UTF8.GetBytes(record.Value)).AsBase64String(); var hash = new AsciiStringReference { Value = hashString }; hash = await _strings.UpsertAsync(hash); record.Hash = hash; record.HashId = hash.AsciiStringReferenceId; return(record); }
protected override Expression <Func <AsciiStringReference, bool> > FindExisting(AsciiStringReference record) => existing => existing.Value == record.Value;