protected override void ConfigureManifest(IManifestBuilder <DeleteCommentRequest> builder)
 {
     builder.AddRule <NotNullRule>();
     builder.AddMemberRule <NotNullValueRule>(x => x.CommentId);
     builder.AddMemberRule <EntityMustExistRule <Comment> >(x => x.CommentId, c => {
         c.Name(RuleNames.EntityMustExist);
     });
 }
Esempio n. 2
0
 public SyncManifest(IConfigManager configManager,
                     IManifestBuilder manifestBuilder)
 {
     _configManager      = configManager;
     _manifestBuilder    = manifestBuilder;
     _manifestCollection = new ManifestCollection();
     _semaphoreSlim      = new SemaphoreSlim(1, 1);
 }
Esempio n. 3
0
		public BuildManager(IBuildRepository buildRepository, IFileRepository fileRepository, IProjectRepository projectRepository, IProjectNotifier projectNotifier, IManifestBuilder manifestBuilder)
		{
			_fileRepository = DIHelper.VerifyParameter(fileRepository);
			_buildRepository = DIHelper.VerifyParameter(buildRepository);
			_projectRepository = DIHelper.VerifyParameter(projectRepository);
			_projectNotifier = DIHelper.VerifyParameter(projectNotifier);
            _manifestBuilder = DIHelper.VerifyParameter(manifestBuilder);
		}
Esempio n. 4
0
 /// <summary>
 /// Initializes a new instance of a ExtensionProvider at the given root directory.
 /// </summary>
 /// <param name="hostingEnvironment">hostingEnvironment containing the fileproviders.</param>
 /// <param name="manifestBuilder">The manifest provider.</param>
 /// <param name="featureManager">The feature manager.</param>
 public ExtensionProvider(
     IHostingEnvironment hostingEnvironment,
     IManifestBuilder manifestBuilder,
     IFeatureManager featureManager)
 {
     _fileProvider    = hostingEnvironment.ContentRootFileProvider;
     _manifestBuilder = manifestBuilder;
     _featureManager  = featureManager;
 }
Esempio n. 5
0
 /// <summary>
 /// Initializes a new instance of a ExtensionProvider at the given root directory.
 /// </summary>
 /// <param name="hostingEnvironment">hostingEnvironment containing the fileproviders.</param>
 /// <param name="manifestBuilder">The manifest provider.</param>
 /// <param name="featureManager">The feature manager.</param>
 public ExtensionProvider(
     IHostingEnvironment hostingEnvironment,
     IManifestBuilder manifestBuilder,
     IEnumerable <IFeaturesProvider> featureProviders)
 {
     _fileProvider     = hostingEnvironment.ContentRootFileProvider;
     _manifestBuilder  = manifestBuilder;
     _featuresProvider = new CompositeFeaturesProvider(featureProviders);
 }
Esempio n. 6
0
 protected override void ConfigureManifest(IManifestBuilder <CreateCommentRequest> builder)
 {
     builder.AddRule <NotNullRule>();
     builder.AddMemberRule <NotNullValueRule>(x => x.TicketId);
     builder.AddMemberRule <EntityMustExistRule <Ticket> >(x => x.TicketId);
     builder.AddMemberRule <NotNullValueRule>(x => x.Body);
     builder.AddMemberRule <RegexMatchValueRule>(x => x.Body, c => {
         c.Configure(r => r.Pattern = @"^\S+");
     });
 }
 protected override void ConfigureManifest(IManifestBuilder <CreateSprintRequest> builder)
 {
     builder.AddRule <NotNullRule>();
     builder.AddMemberRule <NotNullValueRule>(x => x.Name);
     builder.AddMemberRule <RegexMatchValueRule>(x => x.Name, c => {
         c.Configure(r => r.Pattern = @"^\S+");
     });
     builder.AddRule <EndDateMustNotBeBeforeStartDateRule>(c => {
         c.Name(RuleNames.EndDateBeforeStartDate);
     });
 }
		public OfflineDeploymentManager(IDeployRepository deployRepository, IDeployStateRepository deployStateRepository, IOfflineDeploymentRepository offlineDeploymentRepository, IProjectRepository projectRepository, ISystemSettings systemSettings, IFileRepository fileRepository, IZipper zipper, IManifestBuilder manifestBuilder)
		{
			_deployRepository = DIHelper.VerifyParameter(deployRepository);
            _deployStateRepository = DIHelper.VerifyParameter(deployStateRepository);
			_offlineDeploymentRepository = DIHelper.VerifyParameter(offlineDeploymentRepository);
            _projectRepository = DIHelper.VerifyParameter(projectRepository);
            _systemSettings = DIHelper.VerifyParameter(systemSettings);
            _fileRepository = DIHelper.VerifyParameter(fileRepository);
            _zipper = DIHelper.VerifyParameter(zipper);
            _manifestBuilder = DIHelper.VerifyParameter(manifestBuilder);
		}
 protected override void ConfigureManifest(IManifestBuilder <CreateTicketRequest> builder)
 {
     builder.AddRule <NotNullRule>();
     builder.AddMemberRule <NotNullValueRule>(x => x.Title);
     builder.AddMemberRule <RegexMatchValueRule>(x => x.Title, c => {
         c.Configure(r => r.Pattern = @"^\S+");
     });
     builder.AddMemberRule <EntityMustExistRule <Sprint> >(x => x.SprintIdentity);
     builder.AddMemberRule <NotNullValueRule>(x => x.TicketTypeIdentity);
     builder.AddMemberRule <EntityMustExistRule <TicketType> >(x => x.TicketTypeIdentity);
     builder.AddRule <ChangedTicketRelationshipsRule>();
 }
Esempio n. 10
0
 protected override void ConfigureManifest(IManifestBuilder <EditCommentRequest> builder)
 {
     builder.AddRule <NotNullRule>();
     builder.AddMemberRule <NotNullValueRule>(x => x.CommentIdentity);
     builder.AddMemberRule <EntityMustExistRule <Comment> >(x => x.CommentIdentity, c => {
         c.Name(RuleNames.EntityMustExist);
     });
     builder.AddMemberRule <NotNullValueRule>(x => x.Body);
     builder.AddMemberRule <RegexMatchValueRule>(x => x.Body, c => {
         c.Configure(r => r.Pattern = @"^\S+");
     });
 }
Esempio n. 11
0
        protected override void ConfigureManifest(IManifestBuilder <CreateProjectRequest> builder)
        {
            builder.AddMemberRule <NotNullValueRule>(x => x.Name);
            builder.AddMemberRule <StringLengthValueRule>(x => x.Name, r => {
                r.Configure(c => c.MinLength = 1);
            });

            builder.AddMemberRule <NotNullValueRule>(x => x.Code);
            builder.AddMemberRule <StringLengthValueRule>(x => x.Code, r => {
                r.Configure(c => {
                    c.MinLength = Project.MinCodeLength;
                    c.MaxLength = Project.MaxCodeLength;
                });
            });
            builder.AddMemberRule <ProjectCodeMustBeUniqueValueRule>(x => x.Code);
        }
Esempio n. 12
0
        protected override void ConfigureManifest(IManifestBuilder <EditProjectRequest> builder)
        {
            builder.AddMemberRule <EntityMustExistRule <Project> >(x => x.Identity);

            builder.AddMemberRule <NotNullValueRule>(x => x.Name);
            builder.AddMemberRule <StringLengthValueRule>(x => x.Name, r => {
                r.Configure(c => c.MinLength = 1);
            });

            builder.AddMemberRule <NotNullValueRule>(x => x.Code);
            builder.AddMemberRule <StringLengthValueRule>(x => x.Code, r => {
                r.Configure(c => {
                    c.MinLength = Project.MinCodeLength;
                    c.MaxLength = Project.MaxCodeLength;
                });
            });

            builder.AddRule <ProjectCodeMustBeUniqueExceptForSelfRule>(r => r.Name("UniqueCode"));
        }
Esempio n. 13
0
 public PackageBuilder(IManifestBuilder manifestBuilder)
 {
     this.manifestBuilder = manifestBuilder;
 }
Esempio n. 14
0
 protected abstract void ConfigureManifest(IManifestBuilder <TValidated> builder);
Esempio n. 15
0
 public PackageBuilder(IManifestBuilder manifestBuilder)
 {
     this.manifestBuilder = manifestBuilder;
     this.manifestBuilder.Progress += this.OnProgressChanged;
 }
Esempio n. 16
0
 public PackageBuilder(IManifestBuilder manifestBuilder)
 {
     this.manifestBuilder = manifestBuilder;
 }
Esempio n. 17
0
		public FileManager(IFileRepository fileRepository, IFileWriter fileWriter, IManifestBuilder manifestBuilder)
		{
			_fileRepository = DIHelper.VerifyParameter(fileRepository);
			_fileWriter = DIHelper.VerifyParameter(fileWriter);
            _manifestBuilder = DIHelper.VerifyParameter(manifestBuilder);
		}