Наследование: IFilePath
 public IEnumerable<IDebugState> GetDebugStates(string serverWebUri, DirectoryPath directory, FilePath filePath)
 {
     var webclient = new WebClient { Credentials = CredentialCache.DefaultCredentials };
     var address = String.Format(serverWebUri + "{0}/{1}?DirectoryPath={2}&FilePath={3}",
         "Services", "DebugStateService", directory.PathToSerialize, filePath.Title);
     var datalistJson = webclient.UploadString(address, string.Empty);
     return JsonConvert.DeserializeObject<IList<DebugState>>(datalistJson);
 }
Пример #2
0
 /// <summary>
 /// Gets the log details through the webclient.
 /// </summary>
 /// <param name="selectedLogFile">The selected log file.</param>
 /// <author>Jurie.smit</author>
 /// <date>2013/05/24</date>
 private void GetLogDetails(FilePath selectedLogFile)
 {
     DebugOutput.Clear();
     try
     {
         var debugStates = _debugProvider.GetDebugStates(SelectedServer.Connection.WebServerUri.AbsoluteUri, LogDirectory, selectedLogFile);
         debugStates.ToList().ForEach(s => DebugOutput.Append(s));
     }
     catch(Exception exception)
     {
         ShowError(exception);
     }
 }
Пример #3
0
 public IEnumerable<IDebugState> GetDebugStates(string serverWebUri, DirectoryPath directory, FilePath path)
 {
     var list = new List<DebugState>
     {
         new DebugState
         {
             StateType = StateType.Before,
             ServerID = ServerID,
             ParentID = Guid.Empty,
             ID = Workflow1ID,
             DisplayName = "Workflow1",
             HasError = false,
             Name = "DsfActivity",
             ActivityType = ActivityType.Workflow,
             StartTime = _startDate,
             EndTime = _startDate.AddMinutes(1)
         },
         new DebugState
         {
             StateType = StateType.All,
             ServerID = ServerID,
             ParentID = Workflow1ID,
             ID = Assign1ID,
             DisplayName = "Assign1",
             HasError = false,
             Name = "Assign",
             ActivityType = ActivityType.Step,
             StartTime = _startDate.AddMinutes(1),
             EndTime = _startDate.AddMinutes(2)
         },
         new DebugState
         {
             StateType = StateType.Before,
             ServerID = ServerID,
             ParentID = Workflow1ID,
             ID = Workflow2ID,
             DisplayName = "Workflow2",
             HasError = false,
             Name = "DsfActivity",
             ActivityType = ActivityType.Step,
             StartTime = _startDate.AddMinutes(2),
             EndTime = _startDate.AddMinutes(3)
         },
         new DebugState
         {
             StateType = StateType.All,
             ServerID = ServerID,
             ParentID = Workflow2ID,
             ID = Assign2ID,
             DisplayName = "Assign2",
             HasError = false,
             Name = "Assign",
             ActivityType = ActivityType.Step,
             StartTime = _startDate.AddMinutes(3),
             EndTime = _startDate.AddMinutes(4)
         },
         new DebugState
         {
             StateType = StateType.After,
             ServerID = ServerID,
             ParentID = Workflow1ID,
             ID = Workflow2ID,
             DisplayName = "Workflow2",
             HasError = false,
             Name = "DsfActivity",
             ActivityType = ActivityType.Step,
             StartTime = _startDate.AddMinutes(4),
             EndTime = _startDate.AddMinutes(5)
         },
         new DebugState
         {
             StateType = StateType.After,
             ServerID = ServerID,
             ParentID = Guid.Empty,
             ID = Workflow1ID,
             DisplayName = "Workflow1",
             HasError = false,
             Name = "DsfActivity",
             ActivityType = ActivityType.Workflow,
             StartTime = _startDate.AddMinutes(5),
             EndTime = _startDate.AddMinutes(6)
         },
         new DebugState
         {
             StateType = StateType.All,
             ServerID = ServerID,
             ParentID = Guid.Empty,
             ID = Assign3ID,
             DisplayName = "Assign3",
             HasError = false,
             Name = "Assign",
             ActivityType = ActivityType.Step,
             StartTime = _startDate.AddMinutes(6),
             EndTime = _startDate.AddMinutes(7)
         }
     };
     return list;
 }
Пример #4
0
        /// <summary>
        /// Deletes the specified file path by sending a message to web client.
        /// </summary>
        /// <param name="filePath">The file path.</param>
        /// <author>Jurie.smit</author>
        /// <date>2013/05/24</date>
        public void Delete(FilePath filePath)
        {
            var address = String.Format(SelectedServer.Connection.WebServerUri + "{0}/{1}?Directory={2}&FilePath={3}",
                "Services", "DeleteLogService", LogDirectory.PathToSerialize, filePath.Title);
            var response = WebClient.UploadString(address, string.Empty);

            if(response.Contains("Success"))
            {
                LogFiles.Remove(filePath);
                DebugOutput.Clear();
            }
            else
            {
                ShowError(response);
            }
        }
        public IEnumerable <IDebugState> GetDebugStates(string serverWebUri, DirectoryPath directory, FilePath filePath)
        {
            var webclient = new WebClient {
                Credentials = CredentialCache.DefaultCredentials
            };
            var address = String.Format(serverWebUri + "{0}/{1}?DirectoryPath={2}&FilePath={3}",
                                        "Services", "DebugStateService", directory.PathToSerialize, filePath.Title);
            var datalistJson = webclient.UploadString(address, string.Empty);

            return(JsonConvert.DeserializeObject <IList <DebugState> >(datalistJson));
        }