コード例 #1
0
ファイル: Program.cs プロジェクト: lnaie/nfiletorage
 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));
     }
 }
コード例 #2
0
 protected FileStorageRepository(string path)
 {
     FileStorageName = path;
     FileStorageFacade.Create(FileStorageName, CreateFileStorageBehaviour.IgnoreWhenExists);
     Api = new LastfmApiWrapper();
 }
コード例 #3
0
ファイル: Program.cs プロジェクト: lnaie/nfiletorage
 public static void CreateContainer()
 {
     FileStorageFacade.Create(fileStorageName, CreateFileStorageBehaviour.ThrowExceptionWhenExists);
     Console.WriteLine(FileStorageFacade.GetInfo(fileStorageName));
 }
コード例 #4
0
 protected void Page_Load(object sender, EventArgs e)
 {
     FileStorageFacade.Create(fileStorageName, CreateFileStorageBehaviour.IgnoreWhenExists);
     InfoLabel.Text = "";
     RedrawPicturesInFileStorage();
 }