private static Boolean IsMsmqConfigurationOK() { if (MsmqAccess.IsExist(ConfigParameter.MsmqPath)) { return(true); } else { LogHelper.WriteError(String.Format(ResourceLogic.GetString(ResourceKeyName.MsmqPathNotFound), ConfigParameter.MsmqPath)); return(false); } }
private static Boolean IsFileConfigurationOK() { if (String.IsNullOrEmpty(ConfigParameter.FilePath)) { LogHelper.WriteError(String.Format(ResourceLogic.GetString(ResourceKeyName.AddressMissing))); return(false); } if (!Directory.Exists(ConfigParameter.FilePath)) //folder not found { LogHelper.WriteError(String.Format(ResourceLogic.GetString(ResourceKeyName.DumpFolderNotFound), ConfigParameter.FilePath)); return(false); } return(true); }
/// <summary> /// check AppSetting for the only one layer activated /// </summary> /// <returns></returns> public static Boolean IsConfigurationOk() { switch (WhichDumpIsSelected()) { case DumpType.File: //file key return(IsFileConfigurationOK()); case DumpType.Msmq: //Msmq Key return(IsMsmqConfigurationOK()); case DumpType.Wcf: return(true); //currently I found no test for validating the configuration } //Configuration Error LogHelper.WriteError(ResourceLogic.GetString(ResourceKeyName.ErrorNoLayerActivated)); return(false); }