Example #1
0
 private StreamConfiguration(StreamConfigurationBuilder builder)
 {
     Name              = builder._name;
     Description       = builder._description;
     Subjects          = builder._subjects;
     RetentionPolicy   = builder._retentionPolicy;
     MaxConsumers      = builder._maxConsumers;
     MaxMsgs           = builder._maxMsgs;
     MaxMsgsPerSubject = builder._maxMsgsPerSubject;
     MaxBytes          = builder._maxBytes;
     MaxAge            = builder._maxAge;
     MaxValueSize      = builder._maxMsgSize;
     StorageType       = builder._storageType;
     Replicas          = builder._replicas;
     NoAck             = builder._noAck;
     TemplateOwner     = builder._templateOwner;
     DiscardPolicy     = builder._discardPolicy;
     DuplicateWindow   = builder._duplicateWindow;
     Placement         = builder._placement;
     Mirror            = builder._mirror;
     Sources           = builder._sources;
     Sealed            = builder._sealed;
     AllowRollup       = builder._allowRollup;
     DenyDelete        = builder._denyDelete;
     DenyPurge         = builder._denyPurge;
 }
 /// <summary>
 /// Construct the builder by copying another configuration
 /// </summary>
 /// <param name="kvc">the other configuration</param>
 public KeyValueConfigurationBuilder(KeyValueConfiguration kvc)
 {
     if (kvc == null)
     {
         scBuilder = new StreamConfigurationBuilder();
         WithMaxHistoryPerKey(1);
         WithReplicas(1);
     }
     else
     {
         scBuilder = new StreamConfigurationBuilder(kvc.BackingConfig);
         _name     = KeyValueUtil.ExtractBucketName(kvc.BackingConfig.Name);
     }
 }