protected override void InternalProcessRecord() { try { DocumentFormatManager documentFormatManager = new DocumentFormatManager((this.Server == null) ? "localhost" : this.Server.Fqdn); documentFormatManager.EnableParsing(this.Identity.ToString(), this.Enabled); } catch (PerformingFastOperationException exception) { base.WriteError(exception, ErrorCategory.NotSpecified, null); } }
protected override void InternalProcessRecord() { try { DocumentFormatManager documentFormatManager = new DocumentFormatManager((this.Server == null) ? "localhost" : this.Server.Fqdn); if (this.Identity != null) { base.WriteObject(new SearchDocumentFormatInfoObject(documentFormatManager.GetFormat(this.Identity.ToString()))); } else { IList <FileFormatInfo> list = documentFormatManager.ListSupportedFormats(); foreach (FileFormatInfo ffInfo in list) { base.WriteObject(new SearchDocumentFormatInfoObject(ffInfo)); } } } catch (PerformingFastOperationException exception) { base.WriteError(exception, ErrorCategory.NotSpecified, null); } }