Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WCF / Tools / comsvcutil / ToolConsole.cs / 1305376 / ToolConsole.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.Tools.ServiceModel.ComSvcConfig { using System; using System.ServiceModel.Channels; using System.IO; using Microsoft.Tools.ServiceModel; using Microsoft.Tools.ServiceModel.SvcUtil; internal static class ToolConsole { static bool verbose = false; static public bool Verbose { set { verbose = value; } } internal static void WriteQueryLine(string str) { Console.WriteLine(str); } internal static void WriteLine(string str) { Console.WriteLine(str); } internal static void WriteError(Exception e) { WriteError(e, SR.GetString(SR.Error)); } internal static void WriteWarning(string message) { if (verbose ) { Console.Write(SR.GetString(SR.Warning)); Console.WriteLine(message); } } internal static void WriteNonVerboseWarning(string message) { Console.Write(SR.GetString(SR.Warning)); Console.WriteLine(message); } internal static void WriteError(string errMsg, string prefix) { Console.Error.Write(prefix); Console.Error.WriteLine(errMsg); } internal static void WriteError(Exception e, string prefix) { WriteError(e.Message, prefix); if (e.InnerException != null) WriteError(e.InnerException, " "); } internal static void WriteDetailedException (Exception e, string prefix) { WriteError(e, prefix); if (e.InnerException != null) WriteError(e.InnerException, " "); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace Microsoft.Tools.ServiceModel.ComSvcConfig { using System; using System.ServiceModel.Channels; using System.IO; using Microsoft.Tools.ServiceModel; using Microsoft.Tools.ServiceModel.SvcUtil; internal static class ToolConsole { static bool verbose = false; static public bool Verbose { set { verbose = value; } } internal static void WriteQueryLine(string str) { Console.WriteLine(str); } internal static void WriteLine(string str) { Console.WriteLine(str); } internal static void WriteError(Exception e) { WriteError(e, SR.GetString(SR.Error)); } internal static void WriteWarning(string message) { if (verbose ) { Console.Write(SR.GetString(SR.Warning)); Console.WriteLine(message); } } internal static void WriteNonVerboseWarning(string message) { Console.Write(SR.GetString(SR.Warning)); Console.WriteLine(message); } internal static void WriteError(string errMsg, string prefix) { Console.Error.Write(prefix); Console.Error.WriteLine(errMsg); } internal static void WriteError(Exception e, string prefix) { WriteError(e.Message, prefix); if (e.InnerException != null) WriteError(e.InnerException, " "); } internal static void WriteDetailedException (Exception e, string prefix) { WriteError(e, prefix); if (e.InnerException != null) WriteError(e.InnerException, " "); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- IndexingContentUnit.cs
- Lasso.cs
- SessionState.cs
- SimplePropertyEntry.cs
- TemplateParser.cs
- BamlLocalizerErrorNotifyEventArgs.cs
- WorkflowControlClient.cs
- ToolboxComponentsCreatedEventArgs.cs
- QuaternionConverter.cs
- DecoderFallback.cs
- UniqueTransportManagerRegistration.cs
- EventLogInternal.cs
- DockAndAnchorLayout.cs
- ZipPackagePart.cs
- XPathItem.cs
- ImageAttributes.cs
- EmptyEnumerable.cs
- InternalTypeHelper.cs
- BaseInfoTable.cs
- LinkDescriptor.cs
- BrowsableAttribute.cs
- NetworkStream.cs
- ChtmlCalendarAdapter.cs
- CompositionAdorner.cs
- GcHandle.cs
- RsaSecurityTokenAuthenticator.cs
- PageHandlerFactory.cs
- IFlowDocumentViewer.cs
- XmlEntity.cs
- StreamWriter.cs
- PointHitTestResult.cs
- Point3DValueSerializer.cs
- LocalizedNameDescriptionPair.cs
- PropertyConverter.cs
- DelegateSerializationHolder.cs
- diagnosticsswitches.cs
- ChannelBuilder.cs
- BasicAsyncResult.cs
- WithStatement.cs
- XmlTextAttribute.cs
- CookieHandler.cs
- TransactionException.cs
- WindowsTreeView.cs
- Quaternion.cs
- DynamicValueConverter.cs
- FillErrorEventArgs.cs
- Selection.cs
- ApplicationFileParser.cs
- XmlValidatingReader.cs
- WebConfigManager.cs
- Comparer.cs
- WpfKnownType.cs
- SelectionGlyph.cs
- nulltextcontainer.cs
- SizeConverter.cs
- PublisherIdentityPermission.cs
- smtppermission.cs
- Subset.cs
- XmlSchemaSet.cs
- FormsIdentity.cs
- RoutedEventHandlerInfo.cs
- ComplexLine.cs
- DLinqTableProvider.cs
- ApplicationDirectory.cs
- OracleColumn.cs
- EasingQuaternionKeyFrame.cs
- XmlTypeAttribute.cs
- BulletChrome.cs
- XPathDocumentNavigator.cs
- QueryRewriter.cs
- Stream.cs
- LineGeometry.cs
- StrokeNodeEnumerator.cs
- CodeStatement.cs
- Substitution.cs
- FilterQueryOptionExpression.cs
- InfoCardRSAPKCS1SignatureDeformatter.cs
- BamlLocalizableResource.cs
- TokenFactoryFactory.cs
- RequestQueryProcessor.cs
- XmlStreamNodeWriter.cs
- SpeechUI.cs
- RenderCapability.cs
- ColorBlend.cs
- RewritingSimplifier.cs
- QueryResult.cs
- HtmlWindowCollection.cs
- ContextMenu.cs
- MD5CryptoServiceProvider.cs
- XPathMultyIterator.cs
- TargetException.cs
- EntityStoreSchemaGenerator.cs
- StreamInfo.cs
- ReadContentAsBinaryHelper.cs
- PromptBuilder.cs
- FormViewDeleteEventArgs.cs
- QilFunction.cs
- RecordsAffectedEventArgs.cs
- SettingsPropertyIsReadOnlyException.cs
- SchemaMapping.cs