예제 #1
0
        public static NetworkModel CreateNew(string name, string description, Guid ownerId)
        {
            NetworkAccessModel readAccess  = NetworkAccessModel.CreateNew();
            NetworkAccessModel writeAccess = NetworkAccessModel.CreateNew();

            return(new NetworkModel(
                       Guid.NewGuid(),
                       name,
                       description,
                       DateTimeOffset.UtcNow,
                       ownerId,
                       readAccess,
                       writeAccess));
        }
예제 #2
0
 private NetworkModel(
     Guid id,
     string name,
     string description,
     DateTimeOffset createdDate,
     Guid ownerId,
     NetworkAccessModel readAccess,
     NetworkAccessModel writeAccess)
 {
     Id          = id;
     Name        = name;
     Description = description;
     CreatedDate = createdDate;
     OwnerId     = ownerId;
     ReadAccess  = readAccess;
     WriteAccess = writeAccess;
 }