Exemple #1
0
            public EntityType(
                Guid id,
                Guid destinationSystemId,
                string name,
                Type type,
                Type sinkType,
                Type cacheFeedType,
                bool isMutable,
                bool isDuplicable)
            {
                // validate parameters
                ArgumentValidator.EnsureArgumentNotEmpty(id, nameof(id));
                ArgumentValidator.EnsureArgumentNotEmpty(
                    destinationSystemId, nameof(destinationSystemId));
                ArgumentValidator.EnsureArgumentNotNullOrWhiteSpace(name, nameof(name));
                string trimmedName = name.Trim();

                ArgumentValidator.EnsureArgumentDoesNotExceedMaxLength(
                    trimmedName, MaxNameLength, nameof(name));
                ArgumentValidator.EnsureArgumentNotNull(type, nameof(type));
                ArgumentValidator.EnsureArgumentNotNull(sinkType, nameof(sinkType));

                // set property values
                this.Id = id;
                this.DestinationSystemId = destinationSystemId;
                this.Name                  = trimmedName;
                this.TypeName              = type.AssemblyQualifiedName;
                this.SinkTypeFullName      = sinkType.GetStrippedFullName();
                this.CacheFeedTypeFullName = cacheFeedType?.GetStrippedFullName();
                this.IsMutable             = isMutable;
                this.IsDuplicable          = isDuplicable;
            }
Exemple #2
0
            public ExternalSystem(Guid id, string name)
            {
                // validate parameters
                ArgumentValidator.EnsureArgumentNotEmpty(id, nameof(id));
                ArgumentValidator.EnsureArgumentNotNullOrWhiteSpace(name, nameof(name));
                string trimmedName = name.Trim();

                ArgumentValidator.EnsureArgumentDoesNotExceedMaxLength(
                    trimmedName, MaxNameLength, nameof(name));

                // set property values
                this.Id   = id;
                this.Name = trimmedName;
            }
Exemple #3
0
 private void ValidateParameterArguments(
     Guid?destinationSystemId,
     Guid?entityTypeId,
     Guid?sourceSystemId,
     string name,
     string value)
 {
     this.EnsureNotEmptyIfNotNull(
         destinationSystemId, nameof(destinationSystemId));
     this.EnsureNotEmptyIfNotNull(entityTypeId, nameof(entityTypeId));
     this.EnsureNotEmptyIfNotNull(sourceSystemId, nameof(sourceSystemId));
     ArgumentValidator.EnsureArgumentNotNullOrWhiteSpace(name, nameof(name));
     ArgumentValidator.EnsureArgumentNotNullOrWhiteSpace(value, nameof(value));
     ArgumentValidator.EnsureArgumentDoesNotExceedMaxLength(
         name, MaxParameterNameLength, nameof(name));
     ArgumentValidator.EnsureArgumentDoesNotExceedMaxLength(
         value, MaxParameterValueLength, nameof(value));
 }