Esempio n. 1
0
 public DomainMetadata(
     string name,
     string description,
     MetadataVersion version,
     AggregateMetadata[] aggregates)
     : base(name, description, version)
 {
     Aggregates = new ReadOnlyCollection <AggregateMetadata>(aggregates ?? new AggregateMetadata[0]);
     foreach (var aggregate in Aggregates)
     {
         aggregate.Parent = this;
     }
 }
Esempio n. 2
0
 public DataTypeMetadata(
     string name,
     string description,
     MetadataVersion version,
     Type clrType)
     : base(name, description, version)
 {
     if (clrType == null)
     {
         throw new ArgumentNullException(nameof(clrType));
     }
     ClrType = clrType;
 }
Esempio n. 3
0
 public SolutionMetadata(
     string name,
     string description,
     MetadataVersion version,
     DomainMetadata[] domains)
     : base(name, description, version)
 {
     Domains = new ReadOnlyCollection <DomainMetadata>(domains ?? new DomainMetadata[0]);
     foreach (var domain in Domains)
     {
         domain.Parent = this;
     }
 }
        protected MetadataElement(string name, string description, MetadataVersion version)
        {
            if (name == null)
            {
                throw new ArgumentNullException(nameof(name));
            }
            if (version == null)
            {
                throw new ArgumentNullException(nameof(version));
            }

            Name        = name;
            Description = description;
            Version     = version;
        }
        public AggregateMetadata(
            string name,
            string description,
            MetadataVersion version,
            DataTypeMetadata[] commands,
            DataTypeMetadata[] events,
            DataTypeMetadata[] states)
            : base(name, description, version)
        {
            Commands = new ReadOnlyCollection <DataTypeMetadata>(commands ?? new DataTypeMetadata[0]);
            Events   = new ReadOnlyCollection <DataTypeMetadata>(events ?? new DataTypeMetadata[0]);
            States   = new ReadOnlyCollection <DataTypeMetadata>(states ?? new DataTypeMetadata[0]);

            foreach (var dataType in Commands.Concat(Events).Concat(States))
            {
                dataType.Parent = this;
            }
        }