public static ISignableContract NewSubContract(this ISignableContract contract) { ISignableContract newSubContract = new SignableContract(); contract.AddSubContract(newSubContract); return(newSubContract); }
public static ISignedContract WriteContract(Identifier contractId) { if (Settings.cachingEnabled && CachedContracts.ContainsKey(contractId)) { return(CachedContracts[contractId]); } if (!RawData.contractWriterTypeNames.ContainsKey(contractId)) { Debug.LogError("Invalid contract id " + contractId); return(EmptySignedContract.Instance); } ContractWriter contractWriter = NewWriter(RawData.contractWriterTypeNames[contractId]); ISignableContract contract = NewContract(); contractWriter.Write(contract); ISignedContract signedContract = contract.Sign(); if (Settings.cachingEnabled) { CachedContracts[contractId] = signedContract; } return(signedContract); }
public void AddSubContract(ISignableContract subContract) { _subContracts.Add(subContract); }