public static void New ( [Required] string fileStorageName ) { try { var startDateTime = DateTime.Now; FileStorageFacade.Create(fileStorageName, CreateFileStorageBehaviour.ThrowExceptionWhenExists); var timeSpan = DateTime.Now - startDateTime; Console.WriteLine(string.Format("File storage {0} created", fileStorageName)); Console.WriteLine(string.Format("This operation took {0} msecs", (Int64)timeSpan.TotalMilliseconds)); } catch (Exception e) { Console.WriteLine(string.Format("An error occured; {0}", e.Message)); } }
protected FileStorageRepository(string path) { FileStorageName = path; FileStorageFacade.Create(FileStorageName, CreateFileStorageBehaviour.IgnoreWhenExists); Api = new LastfmApiWrapper(); }
public static void CreateContainer() { FileStorageFacade.Create(fileStorageName, CreateFileStorageBehaviour.ThrowExceptionWhenExists); Console.WriteLine(FileStorageFacade.GetInfo(fileStorageName)); }
protected void Page_Load(object sender, EventArgs e) { FileStorageFacade.Create(fileStorageName, CreateFileStorageBehaviour.IgnoreWhenExists); InfoLabel.Text = ""; RedrawPicturesInFileStorage(); }