Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / Orcas / NetFXw7 / ndp / fx / src / xsp / System / Web / Extensions / Compilation / WCFModel / ProxyGenerationError.cs / 1 / ProxyGenerationError.cs
//------------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation. All Rights Reserved.
//
//-----------------------------------------------------------------------------
//
// This code is shared between ndp\fx\src\xsp\System\Web\Extensions\Compilation\WCFModel
// and wizard\vsdesigner\designer\microsoft\vsdesigner\WCFModel.
// Please make sure the code files between those two directories are alway in [....] when you make any changes to this code.
// And always test these code in both places before check in.
// The code under ndp\fx\src\xsp\System\Web\Extensions\Compilation\XmlSerializer might have to be regerenated when
// the format of the svcmap file is changed, or class structure has been changed in this directory. Please follow the HowTo file
// under Compilation directory to see how to regerenate that code.
//
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;
using System.Xml;
using System.Xml.Schema;
#if WEB_EXTENSIONS_CODE
namespace System.Web.Compilation.WCFModel
#else
namespace Microsoft.VSDesigner.WCFModel
#endif
{
///
/// This class represents an error message happens when we generate code
///
///
#if WEB_EXTENSIONS_CODE
internal class ProxyGenerationError
#else
[CLSCompliant(true)]
public class ProxyGenerationError
#endif
{
private bool m_IsWarning;
private string m_Message;
private string m_MetadataFile;
private int m_LineNumber;
private int m_LinePosition;
private GeneratorState m_ErrorGeneratorState;
///
/// Constructor
///
/// MetadataConversionError
///
public ProxyGenerationError(MetadataConversionError errorMessage)
{
m_ErrorGeneratorState = GeneratorState.GenerateCode;
m_IsWarning = errorMessage.IsWarning;
m_Message = errorMessage.Message;
m_MetadataFile = String.Empty;
m_LineNumber = -1;
m_LinePosition = -1;
}
///
/// Constructor
///
///
///
/// An IOException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, Exception errorException)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = false;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = -1;
m_LinePosition = -1;
}
///
/// Constructor
///
///
///
/// An IOException
/// An IOException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, Exception errorException, bool isWarning)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = isWarning;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = -1;
m_LinePosition = -1;
}
///
/// Constructor
///
///
///
/// An XmlException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, XmlException errorException)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = false;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = errorException.LineNumber;
m_LinePosition = errorException.LinePosition;
}
///
/// Constructor
///
///
///
/// An XmlException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, XmlSchemaException errorException)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = false;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = errorException.LineNumber;
m_LinePosition = errorException.LinePosition;
}
///
/// Constructor
///
///
///
/// An XmlException
/// An XmlException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, XmlSchemaException errorException, bool isWarning)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = isWarning;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = errorException.LineNumber;
m_LinePosition = errorException.LinePosition;
}
///
/// This property represents when an error message happens
///
///
///
public GeneratorState ErrorGeneratorState
{
get
{
return m_ErrorGeneratorState;
}
}
///
/// True: if it is a warning message, otherwise, an error
///
///
///
public bool IsWarning
{
get
{
return m_IsWarning;
}
}
///
/// Line Number when error happens
///
///
///
public int LineNumber
{
get
{
return m_LineNumber;
}
}
///
/// Column Number in the line when error happens
///
///
///
public int LinePosition
{
get
{
return m_LinePosition;
}
}
///
/// return the error message
///
///
///
public string Message
{
get
{
return m_Message;
}
}
///
/// return the error message
///
///
///
public string MetadataFile
{
get
{
return m_MetadataFile;
}
}
///
/// This enum represents when an error message happens
///
///
public enum GeneratorState
{
LoadMetadata = 0,
MergeMetadata = 1,
GenerateCode = 2,
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
//------------------------------------------------------------------------------
//
// Copyright (C) Microsoft Corporation. All Rights Reserved.
//
//-----------------------------------------------------------------------------
//
// This code is shared between ndp\fx\src\xsp\System\Web\Extensions\Compilation\WCFModel
// and wizard\vsdesigner\designer\microsoft\vsdesigner\WCFModel.
// Please make sure the code files between those two directories are alway in [....] when you make any changes to this code.
// And always test these code in both places before check in.
// The code under ndp\fx\src\xsp\System\Web\Extensions\Compilation\XmlSerializer might have to be regerenated when
// the format of the svcmap file is changed, or class structure has been changed in this directory. Please follow the HowTo file
// under Compilation directory to see how to regerenate that code.
//
using System;
using System.Diagnostics;
using System.Globalization;
using System.IO;
using System.ServiceModel;
using System.ServiceModel.Channels;
using System.ServiceModel.Configuration;
using System.ServiceModel.Description;
using System.Xml;
using System.Xml.Schema;
#if WEB_EXTENSIONS_CODE
namespace System.Web.Compilation.WCFModel
#else
namespace Microsoft.VSDesigner.WCFModel
#endif
{
///
/// This class represents an error message happens when we generate code
///
///
#if WEB_EXTENSIONS_CODE
internal class ProxyGenerationError
#else
[CLSCompliant(true)]
public class ProxyGenerationError
#endif
{
private bool m_IsWarning;
private string m_Message;
private string m_MetadataFile;
private int m_LineNumber;
private int m_LinePosition;
private GeneratorState m_ErrorGeneratorState;
///
/// Constructor
///
/// MetadataConversionError
///
public ProxyGenerationError(MetadataConversionError errorMessage)
{
m_ErrorGeneratorState = GeneratorState.GenerateCode;
m_IsWarning = errorMessage.IsWarning;
m_Message = errorMessage.Message;
m_MetadataFile = String.Empty;
m_LineNumber = -1;
m_LinePosition = -1;
}
///
/// Constructor
///
///
///
/// An IOException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, Exception errorException)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = false;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = -1;
m_LinePosition = -1;
}
///
/// Constructor
///
///
///
/// An IOException
/// An IOException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, Exception errorException, bool isWarning)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = isWarning;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = -1;
m_LinePosition = -1;
}
///
/// Constructor
///
///
///
/// An XmlException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, XmlException errorException)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = false;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = errorException.LineNumber;
m_LinePosition = errorException.LinePosition;
}
///
/// Constructor
///
///
///
/// An XmlException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, XmlSchemaException errorException)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = false;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = errorException.LineNumber;
m_LinePosition = errorException.LinePosition;
}
///
/// Constructor
///
///
///
/// An XmlException
/// An XmlException
///
public ProxyGenerationError(GeneratorState generatorState, string fileName, XmlSchemaException errorException, bool isWarning)
{
m_ErrorGeneratorState = generatorState;
m_IsWarning = isWarning;
m_Message = errorException.Message;
m_MetadataFile = fileName;
m_LineNumber = errorException.LineNumber;
m_LinePosition = errorException.LinePosition;
}
///
/// This property represents when an error message happens
///
///
///
public GeneratorState ErrorGeneratorState
{
get
{
return m_ErrorGeneratorState;
}
}
///
/// True: if it is a warning message, otherwise, an error
///
///
///
public bool IsWarning
{
get
{
return m_IsWarning;
}
}
///
/// Line Number when error happens
///
///
///
public int LineNumber
{
get
{
return m_LineNumber;
}
}
///
/// Column Number in the line when error happens
///
///
///
public int LinePosition
{
get
{
return m_LinePosition;
}
}
///
/// return the error message
///
///
///
public string Message
{
get
{
return m_Message;
}
}
///
/// return the error message
///
///
///
public string MetadataFile
{
get
{
return m_MetadataFile;
}
}
///
/// This enum represents when an error message happens
///
///
public enum GeneratorState
{
LoadMetadata = 0,
MergeMetadata = 1,
GenerateCode = 2,
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
// Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ThreadAbortException.cs
- SqlCacheDependencySection.cs
- InitializationEventAttribute.cs
- BindMarkupExtensionSerializer.cs
- AttributeSetAction.cs
- MulticastNotSupportedException.cs
- ExpressionWriter.cs
- FormsAuthenticationModule.cs
- Optimizer.cs
- CodeDelegateCreateExpression.cs
- DragStartedEventArgs.cs
- _FtpControlStream.cs
- AndCondition.cs
- BasicBrowserDialog.designer.cs
- WebPartsSection.cs
- NumberSubstitution.cs
- AxImporter.cs
- SamlSecurityTokenAuthenticator.cs
- Point4DValueSerializer.cs
- TextMarkerSource.cs
- ConfigurationPropertyAttribute.cs
- DifferencingCollection.cs
- EnumValidator.cs
- DockEditor.cs
- StringAnimationUsingKeyFrames.cs
- QueryOperatorEnumerator.cs
- TransportOutputChannel.cs
- WebSysDisplayNameAttribute.cs
- TypeSource.cs
- SqlAliaser.cs
- Span.cs
- JavascriptCallbackBehaviorAttribute.cs
- EnumMemberAttribute.cs
- AttributeUsageAttribute.cs
- IndicShape.cs
- DeferredSelectedIndexReference.cs
- SizeValueSerializer.cs
- LinearKeyFrames.cs
- PropertyIDSet.cs
- DispatcherFrame.cs
- Paragraph.cs
- SoapFault.cs
- StoreItemCollection.cs
- DeflateStream.cs
- ProjectionCamera.cs
- XPathNavigatorReader.cs
- CatalogPartCollection.cs
- ExpressionLink.cs
- ResolveDuplexAsyncResult.cs
- ProjectionQueryOptionExpression.cs
- Block.cs
- SiteMapPath.cs
- WpfXamlType.cs
- VirtualPathUtility.cs
- BufferedGraphics.cs
- ExeContext.cs
- Rect.cs
- Keywords.cs
- SignedPkcs7.cs
- PathHelper.cs
- CookielessHelper.cs
- RegistryPermission.cs
- HostingEnvironment.cs
- ObjectSerializerFactory.cs
- ContextInformation.cs
- DataSpaceManager.cs
- DataTrigger.cs
- Parser.cs
- HttpResponse.cs
- _LazyAsyncResult.cs
- sqlinternaltransaction.cs
- RsaSecurityToken.cs
- ProgressChangedEventArgs.cs
- PeerSecurityManager.cs
- FileLogRecordStream.cs
- SecurityChannelFactory.cs
- SchemaMapping.cs
- IntegerCollectionEditor.cs
- DocumentOrderComparer.cs
- ModelVisual3D.cs
- RoleManagerModule.cs
- KeyValuePair.cs
- GlyphTypeface.cs
- HwndHostAutomationPeer.cs
- StorageMappingItemCollection.cs
- SiteMapNode.cs
- BuildProvidersCompiler.cs
- ObjectListFieldCollection.cs
- StrokeDescriptor.cs
- BuilderInfo.cs
- Ray3DHitTestResult.cs
- Point3DConverter.cs
- CharacterBuffer.cs
- DurableInstanceProvider.cs
- DataGridViewCellParsingEventArgs.cs
- TextDecorationCollection.cs
- CodeExporter.cs
- MetadataCacheItem.cs
- ModelServiceImpl.cs
- DataGridPagerStyle.cs