public void UploadContent(string imageStoreConnectionString, string remoteDestination, string localSource, IImageStoreProgressHandler progressHandler, TimeSpan timeout, CopyFlag imageCopyFlag, bool acquireSourceReaderLock) { this.fabricClient.ThrowIfDisposed(); Requires.Argument <string>("localSource", localSource).NotNullOrEmpty(); Requires.Argument <string>("remoteDestination", remoteDestination).NotNullOrEmpty(); Requires.Argument <string>("imageStoreConnectionString", imageStoreConnectionString).NotNullOrEmpty(); IImageStore imageStore = this.fabricClient.GetImageStore(imageStoreConnectionString); if (progressHandler == null) { imageStore.UploadContent( remoteDestination, localSource, timeout, CopyFlag.AtomicCopy, acquireSourceReaderLock); } else { imageStore.UploadContent( remoteDestination, localSource, progressHandler, timeout, imageCopyFlag, acquireSourceReaderLock); } }
private void OutputImageStoreContent( List <ImageStoreFile> sourceFiles, List <ImageStoreFolder> sourceFolders, string version, IImageStore imageStore, StoreLayoutSpecification storeLayoutSpecification, IClusterConnection clusterConnection, TimeoutHelper helper) { var targetFiles = new List <ImageStoreFile>(); var targetFolders = new List <ImageStoreFolder>(); this.GetImageStoreContentByAppVersionImpl( sourceFiles, sourceFolders, targetFiles, targetFolders, version, imageStore, storeLayoutSpecification, clusterConnection, helper); targetFiles.ForEach(file => { base.OutputStoreFileInfo(file); }); targetFolders.ForEach(folder => { base.OutputStoreFolderInfo(folder); }); }
public QueryImageStoreViewModel(IImageStore imageStore, AppViewModel parent) { this.ImageStore = imageStore; this.Name = imageStore.Name; this.QueryImages = new ObservableCollection <ImageInfoViewModel>(); this.ParentViewModel = parent; }
public ImageController(IFolkeConnection session, IForumUserService <TUser, TUserView> accountService, IImageStore imageStore, ForumsDataMapping <TUser, TUserView> forumsDataMapping) { this.session = session; this.accountService = accountService; this.imageStore = imageStore; this.forumsDataMapping = forumsDataMapping; }
public MnistController(IMnistInterpreter mnist, IImageStore image_store, INetworkProposalStorage network_store, Db db) { this.mnist = mnist ?? throw new ArgumentNullException(nameof(mnist)); this.image_store = image_store ?? throw new ArgumentNullException(nameof(image_store)); this.network_store = network_store ?? throw new ArgumentNullException(nameof(network_store)); this.db = db; }
public ImageController(ILogger <GimmickController> logger, Random random, IConfiguration config, IImageStore imageStore) { _logger = logger; this.random = random; this.config = config; this.imageStore = imageStore; }
public Acquisition(IImageStore imageStore) { _imageFetchers = new List <IImageFetcher> { new LocalImageFetcher(), new GoogleCSEFetcher(), new InstagramImageFetcher(), new TwitterImageFetcher() }; _imageStore = imageStore; }
public MessageRepository( ApplicationDbContext dbContext, UserContext userContext, AccountRepository accountRepository, BoardRepository boardRepository, SmileyRepository smileyRepository, IImageStore imageStore, BBCodeParser bbcParser, GzipWebClient webClient, ImgurClient imgurClient, YouTubeClient youTubeClient, ILogger <MessageRepository> log ) { DbContext = dbContext; CurrentUser = userContext; AccountRepository = accountRepository; BoardRepository = boardRepository; SmileyRepository = smileyRepository; ImageStore = imageStore; BBCParser = bbcParser; WebClient = webClient; ImgurClient = imgurClient; YouTubeClient = youTubeClient; Log = log; }
///<summary></summary> public FormDocSign(Document docCur, IImageStore imageStore) { InitializeComponent(); //Can only allow tablet signatures on Windows, since we use a native dll to handle the tablet interaction. if (Environment.OSVersion.Platform != PlatformID.Unix) { //Add signature box for Topaz signatures. sigBoxTopaz = new Topaz.SigPlusNET(); sigBoxTopaz.Location = sigBox.Location; //this puts both boxes in the same spot. sigBoxTopaz.Name = "sigBoxTopaz"; sigBoxTopaz.Size = new System.Drawing.Size(394, 91); //Must be same dimensions as the sigBox. sigBoxTopaz.TabIndex = 92; sigBoxTopaz.Text = "sigPlusNET1"; sigBoxTopaz.Visible = false; Controls.Add(sigBoxTopaz); sigBox.SetTabletState(1); //It starts out accepting input. It will be set to 0 if a sig is already present. It will be set back to 1 if note changes or if user clicks Clear. //Add button to initiate a Topaz signature. butTopazSign = new OpenDental.UI.Button(); butTopazSign.AdjustImageLocation = new System.Drawing.Point(0, 0); butTopazSign.Autosize = true; butTopazSign.BtnShape = OpenDental.UI.enumType.BtnShape.Rectangle; butTopazSign.BtnStyle = OpenDental.UI.enumType.XPStyle.Silver; butTopazSign.CornerRadius = 4F; butTopazSign.Location = new System.Drawing.Point(370, 61); butTopazSign.Name = "butTopazSign"; butTopazSign.Size = new System.Drawing.Size(81, 25); butTopazSign.TabIndex = 89; butTopazSign.Text = "Sign Topaz"; butTopazSign.Click += new System.EventHandler(this.butTopazSign_Click); Controls.Add(butTopazSign); } DocCur = docCur; this.imageStore = imageStore; Lan.F(this); }
public void TestSetup() { this.imageBuilderTestContext = ImageBuilderTestContext.Create(this.TestContext.TestName); this.imageBuilder = imageBuilderTestContext.ImageBuilder; this.imageStore = imageBuilderTestContext.ImageStore; ImageBuilderTest.CreateDropAndSetFabricCodePath(); }
private IImageStore CreateImageStore(string connectionEndpoint, string imageStoreConnectionString, string workingDirectory, string certThumbprint) { if (!imageStoreConnectionString.StartsWith("file:", StringComparison.OrdinalIgnoreCase) && !imageStoreConnectionString.StartsWith("fabric:", StringComparison.OrdinalIgnoreCase)) { throw new ArgumentException(); } string[] connectionEndpoints = { connectionEndpoint }; X509Credentials securityCredentials = null; if (certThumbprint != null && certThumbprint.Length > 0) { securityCredentials = new X509Credentials(); securityCredentials.RemoteCertThumbprints.Add(certThumbprint); securityCredentials.FindType = X509FindType.FindByThumbprint; securityCredentials.FindValue = certThumbprint; securityCredentials.StoreLocation = StoreLocation.CurrentUser; securityCredentials.StoreName = "MyStore"; } IImageStore imageStore = ImageStoreFactoryProxy.CreateImageStore( imageStoreConnectionString, null, connectionEndpoints, securityCredentials, workingDirectory, false); return(imageStore); }
protected void RemoveApplicationPackage(string imageStoreConnectionString, string applicationPackagePath) { try { if (imageStoreConnectionString.StartsWith(Constants.ImageStoreConnectionFabricType, StringComparison.OrdinalIgnoreCase)) { var clusterConnection = this.SessionState.PSVariable.GetValue(Constants.ClusterConnectionVariableName, null) as IClusterConnection; if (clusterConnection.SecurityCredentials != null && clusterConnection.SecurityCredentials.CredentialType == CredentialType.Claims) { clusterConnection.FabricClient.ImageStore.DeleteContent(imageStoreConnectionString, applicationPackagePath, this.GetTimeout()); this.WriteObject(StringResources.Info_RemoveApplicationPackageSucceeded); return; } } IImageStore imageStore = this.CreateImageStore(imageStoreConnectionString, Path.GetTempPath()); imageStore.DeleteContent(applicationPackagePath, this.GetTimeout()); this.WriteObject(StringResources.Info_RemoveApplicationPackageSucceeded); } catch (Exception exception) { this.ThrowTerminatingError( exception, Constants.RemoveApplicationPackageErrorId, null); } }
public AccountRepository( ApplicationDbContext dbContext, UserContext userContext, UserManager <DataModels.ApplicationUser> userManager, SignInManager <DataModels.ApplicationUser> signInManager, IHttpContextAccessor httpContextAccessor, IActionContextAccessor actionContextAccessor, IUrlHelperFactory urlHelperFactory, IEmailSender emailSender, IImageStore imageStore, ILogger <AccountRepository> log ) { DbContext = dbContext; UserContext = userContext; UserManager = userManager; SignInManager = signInManager; HttpContextAccessor = httpContextAccessor; UrlHelper = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext); EmailSender = emailSender; ImageStore = imageStore; Log = log; }
public MessageRepository( ApplicationDbContext dbContext, UserContext userContext, AccountRepository accountRepository, BoardRepository boardRepository, RoleRepository roleRepository, SmileyRepository smileyRepository, IHubContext<ForumHub> forumHub, IActionContextAccessor actionContextAccessor, IUrlHelperFactory urlHelperFactory, IImageStore imageStore, BBCodeParser bbcParser, GzipWebClient webClient, ImgurClient imgurClient, YouTubeClient youTubeClient, ILogger<MessageRepository> log ) { DbContext = dbContext; UserContext = userContext; AccountRepository = accountRepository; BoardRepository = boardRepository; RoleRepository = roleRepository; SmileyRepository = smileyRepository; ForumHub = forumHub; UrlHelper = urlHelperFactory.GetUrlHelper(actionContextAccessor.ActionContext); ImageStore = imageStore; BBCParser = bbcParser; WebClient = webClient; ImgurClient = imgurClient; YouTubeClient = youTubeClient; Log = log; }
/// <summary> /// Constructor for ImageManager /// </summary> public ImageManager() { // INSTANTIATE _images _images = new ImageStore(); // INSTANTIATE _imageProcessorr _imageProcessor = new ImageProcessor(); }
internal FabricLayoutInfo(IImageStore imageStore, string clusterManifestFileName, bool useMSI) { this.ImageStore = imageStore; this.ImageStoreWrapper = new ImageStoreWrapper(imageStore, TestDirectory); this.fullInfrastructureManifestFolderName = Path.Combine(TestUtility.TestDirectory, Path.GetRandomFileName()); this.UseMSI = useMSI; InitializeManifest(clusterManifestFileName); }
public SmileyRepository( ApplicationDbContext dbContext, IImageStore imageStore, ILogger <SmileyRepository> log ) { DbContext = dbContext; ImageStore = imageStore; }
public Task DeleteContentAsync(string imageStoreConnectionString, string remoteLocation, TimeSpan timeout) { this.fabricClient.ThrowIfDisposed(); Requires.Argument <string>("remoteLocation", remoteLocation).NotNullOrEmpty(); Requires.Argument <string>("imageStoreConnectionString", imageStoreConnectionString).NotNullOrEmpty(); IImageStore imageStore = this.fabricClient.GetImageStore(imageStoreConnectionString); return(imageStore.DeleteContentAsync(remoteLocation, timeout)); }
public Task <ImageStorePagedContent> ListPagedContentAsync(string imageStoreConnectionString, ImageStoreListDescription listDescription, TimeSpan timeout) { this.fabricClient.ThrowIfDisposed(); Requires.Argument <string>("remoteLocation", listDescription.RemoteLocation).NotNullOrEmpty(); Requires.Argument <string>("imageStoreConnectionString", imageStoreConnectionString).NotNullOrEmpty(); IImageStore imageStore = this.fabricClient.GetImageStore(imageStoreConnectionString); return(imageStore.ListPagedContentWithDetailsAsync(listDescription, timeout)); }
public void DownloadContent(string imageStoreConnectionString, string remoteSource, string localDestination, TimeSpan timeout, CopyFlag imageCopyFlag) { this.fabricClient.ThrowIfDisposed(); Requires.Argument <string>("remoteSource", remoteSource).NotNullOrEmpty(); Requires.Argument <string>("localDestination", localDestination).NotNullOrEmpty(); IImageStore imageStore = this.fabricClient.GetImageStore(imageStoreConnectionString); imageStore.DownloadContent(remoteSource, localDestination, timeout, imageCopyFlag); }
public Task <ImageStoreContent> ListContentAsync(string imageStoreConnectionString, string remoteLocation, bool isRecursive, TimeSpan timeout) { this.fabricClient.ThrowIfDisposed(); Requires.Argument <string>("remoteLocation", remoteLocation).NotNullOrEmpty(); Requires.Argument <string>("imageStoreConnectionString", imageStoreConnectionString).NotNullOrEmpty(); IImageStore imageStore = this.fabricClient.GetImageStore(imageStoreConnectionString); return(imageStore.ListContentWithDetailsAsync(remoteLocation, isRecursive, timeout)); }
internal SQLiteRecipeStore(SQLiteAsyncConnection connection, IImageStore imageStore, IIngredientStore ingredientStore, IPictogramStore pictogramStore, IRecipeStepStore stepStore) : base(connection, imageStore) { _ingredientStore = ingredientStore; _pictogramStore = pictogramStore; _stepStore = stepStore; // TODO: replace with default image _defaultImage = null; }
public ImageMemeCommands(ILogger <HomieBot> logger, IConfiguration configuration, IImageStore imageStore, IImageProcessor imageProcessor, Random random) { this.logger = logger; this.configuration = configuration; this.imageStore = imageStore; this.imageProcessor = imageProcessor; this.random = random; this.templates = configuration.GetSection("MemeTemplates").Get <IEnumerable <MemeTemplate> >(); this.collections = configuration.GetSection("ImageCollections").Get <IEnumerable <ImageCollection> >(); }
public Smileys( ApplicationDbContext dbContext, SmileyRepository smileyRepository, IImageStore imageStore ) { DbContext = dbContext; SmileyRepository = smileyRepository; ImageStore = imageStore; }
public void TestSetup() { var testName = this.TestContext.TestName; #if DotNetCoreClr testName = this.TestContext.FullyQualifiedTestClassName + "." + this.TestContext.TestName; #endif this.imageBuilderTestContext = ImageBuilderTestContext.Create(testName); this.imageStore = imageBuilderTestContext.ImageStore; }
public static IImageStore GetImageStore(Patient patient) { Type imageStoreType = Type.GetType(ImageStoreTypeName, false); if (imageStoreType == null || !typeof(IImageStore).IsAssignableFrom(imageStoreType)) { imageStoreType = typeof(FileStore); } IImageStore store = (IImageStore)Activator.CreateInstance(imageStoreType); store.OpenPatientStore(patient); return(store); }
public ImageManager( IImageStore imageStore, IHttpContextAccessor contextAccessor, ErrorDescriber errorDescriber, IMapper mapper, ILogger <ImageManager> logger) : base( contextAccessor: contextAccessor, errorDescriber: errorDescriber, mapper: mapper, logger: logger) { ImageStore = imageStore ?? throw new ArgumentNullException(nameof(imageStore)); }
public Task UploadContentAsync(string imageStoreConnectionString, string remoteDestination, string localSource, TimeSpan timeout, CopyFlag imageCopyFlag, bool acquireSourceReaderLock) { this.fabricClient.ThrowIfDisposed(); Requires.Argument <string>("localSource", localSource).NotNullOrEmpty(); Requires.Argument <string>("remoteDestination", remoteDestination).NotNullOrEmpty(); Requires.Argument <string>("imageStoreConnectionString", imageStoreConnectionString).NotNullOrEmpty(); IImageStore imageStore = this.fabricClient.GetImageStore(imageStoreConnectionString); return(imageStore.UploadContentAsync( remoteDestination, localSource, timeout, imageCopyFlag, acquireSourceReaderLock)); }
public void TestApplicationPackage(string connectionEndpoint, string applicationPackagePath, string applicationParameter, string imageStoreConnectionString, string certThumbprint) { string[] parameters = applicationParameter.Split(','); IDictionary <string, string> dictionary = new Dictionary <string, string>(); for (int i = 0; i < parameters.Length / 2; i += 2) { dictionary.Add(parameters[i], parameters[i + 1]); } var testRootPath = Path.Combine(Path.GetTempPath(), string.Format(CultureInfo.InvariantCulture, "{0}_{1}", "TestApplicationPackage", DateTime.Now.Ticks)); try { var applicationName = new DirectoryInfo(applicationPackagePath).Name; var testRootApplicationPath = Path.Combine(testRootPath, applicationName); FabricDirectory.Copy(applicationPackagePath, testRootApplicationPath, true); ImageBuilderUtility.RemoveReadOnlyFlag(testRootApplicationPath); var fileImageStoreConnectionString = string.Format(CultureInfo.InvariantCulture, "{0}{1}", "file:", testRootPath.TrimEnd(Path.DirectorySeparatorChar)); var sourceImageStore = ImageStoreFactoryProxy.CreateImageStore(fileImageStoreConnectionString); IImageStore destinationImageStore = null; if (string.IsNullOrEmpty(imageStoreConnectionString)) { destinationImageStore = sourceImageStore; } else { destinationImageStore = this.CreateImageStore(connectionEndpoint, imageStoreConnectionString, testRootPath, certThumbprint); } var imagebuilder = new ImageBuilder(sourceImageStore, destinationImageStore, this.GetFabricFilePath("ServiceFabricServiceModel.xsd"), testRootPath); imagebuilder.ValidateApplicationPackage( applicationName, dictionary); } catch (Exception e) { throw e; } finally { FabricDirectory.Delete(testRootPath, true, true); } }
public void CopyApplicationPackage(string connectionEndpoint, string applicationPackagePath, string imageStoreConnectionString, string relativeDestinationPath, string certThumbprint) { IImageStore imageStore = CreateImageStore(connectionEndpoint, imageStoreConnectionString, Path.GetTempPath(), certThumbprint); if (string.IsNullOrEmpty(relativeDestinationPath)) { relativeDestinationPath = new DirectoryInfo(applicationPackagePath).Name; } ImageBuilderUtility.ValidateRelativePath(relativeDestinationPath); imageStore.UploadContent( relativeDestinationPath, applicationPackagePath, AzureCliProxy.DefaultTimeSpan, CopyFlag.AtomicCopy, false); }
protected StandardImageManipulator(IImageStore imageStore, ILayersCmsImageReads imageReads) { ImageStore = imageStore; _imageReads = imageReads; }
public HistoryController(IImageStore imageStore) { _imageStore = imageStore; }
internal ImageHandlerInternal(IImageStore imageStore, DateTime now) : this() { _imageStore = imageStore; _now = now; }
public ImageResizerManipulator(IImageStore imageStore, ILayersCmsImageReads imageReads) : base(imageStore, imageReads) { }
public PageController(IImageStore imageStore) { _pages = Data.Biggy.PageList; _imageStore = imageStore; }
internal ImageHandler(IImageStore imageStore, DateTime now) : this(new ImageHandlerInternal(imageStore, now)) { }
public ImageController(IImageStore imageStore) { _imageStore = imageStore; }
public DifferencesController(IImageStore imageStore) { _imageStore = imageStore; }