Code:
/ 4.0 / 4.0 / untmp / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / NetFx40 / System.Activities / System / Activities / ExpressionParser / SourceExpressionException.cs / 1305376 / SourceExpressionException.cs
//------------------------------------------------------------------------------ // Copyright (c) Microsoft Corporation. All rights reserved. //----------------------------------------------------------------------------- namespace System.Activities.ExpressionParser { using System.CodeDom.Compiler; using System.Collections.Generic; using System.Globalization; using System.Runtime; using System.Runtime.Serialization; using System.Security; using System.Security.Permissions; [Serializable] public class SourceExpressionException : Exception, ISerializable { CompilerError[] errors; public SourceExpressionException() : base(SR.CompilerError) { } public SourceExpressionException(string message) : base(message) { } public SourceExpressionException(string message, Exception innerException) : base(message, innerException) { } public SourceExpressionException(string message, CompilerErrorCollection errors) : base(message) { this.errors = new CompilerError[errors.Count]; errors.CopyTo(this.errors, 0); } protected SourceExpressionException(SerializationInfo info, StreamingContext context) : base(info, context) { if (info == null) { throw FxTrace.Exception.ArgumentNull("info"); } int length = info.GetInt32("count"); this.errors = new CompilerError[length]; for (int i = 0; i < length; ++i) { string index = i.ToString(CultureInfo.InvariantCulture); string fileName = info.GetString("file" + index); int line = info.GetInt32("line" + index); int column = info.GetInt32("column" + index); string errorNumber = info.GetString("number" + index); string errorText = info.GetString("text" + index); this.errors[i] = new CompilerError(fileName, line, column, errorNumber, errorText); } } public IEnumerableErrors { get { if (this.errors == null) { this.errors = new CompilerError[0]; } return this.errors; } } public override void GetObjectData(SerializationInfo info, StreamingContext context) { if (info == null) { throw FxTrace.Exception.ArgumentNull("info"); } if (this.errors == null) { info.AddValue("count", 0); } else { info.AddValue("count", this.errors.Length); for (int i = 0; i < this.errors.Length; ++i) { CompilerError error = this.errors[i]; string index = i.ToString(CultureInfo.InvariantCulture); info.AddValue("file" + index, error.FileName); info.AddValue("line" + index, error.Line); info.AddValue("column" + index, error.Column); info.AddValue("number" + index, error.ErrorNumber); info.AddValue("text" + index, error.ErrorText); } } base.GetObjectData(info, context); } } } // 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
- ApplicationGesture.cs
- RegexCompiler.cs
- CalendarDay.cs
- EventProxy.cs
- ReaderWriterLock.cs
- AnnotationDocumentPaginator.cs
- UIElementParaClient.cs
- DataGridItemCollection.cs
- Avt.cs
- PlatformCulture.cs
- Invariant.cs
- ThreadAbortException.cs
- MetaTableHelper.cs
- CngKeyCreationParameters.cs
- SignedXmlDebugLog.cs
- ConfigurationSettings.cs
- ThicknessAnimationUsingKeyFrames.cs
- ChannelBase.cs
- ConfigurationPermission.cs
- ArrayList.cs
- AbstractSvcMapFileLoader.cs
- ReachSerializationUtils.cs
- DetailsViewInsertedEventArgs.cs
- BaseValidator.cs
- BoolLiteral.cs
- AxisAngleRotation3D.cs
- EventLogException.cs
- CodeConstructor.cs
- EventBuilder.cs
- CodeSubDirectoriesCollection.cs
- CompositeControl.cs
- _AuthenticationState.cs
- _AutoWebProxyScriptWrapper.cs
- RowCache.cs
- DragCompletedEventArgs.cs
- DiagnosticsElement.cs
- DocumentViewerAutomationPeer.cs
- DatatypeImplementation.cs
- ReadOnlyAttribute.cs
- CustomTypeDescriptor.cs
- Rule.cs
- ObjectSecurityT.cs
- EditingCommands.cs
- CodeTypeConstructor.cs
- PngBitmapEncoder.cs
- Calendar.cs
- ResourcePermissionBase.cs
- EventToken.cs
- CompositionTarget.cs
- ExtendedPropertyDescriptor.cs
- ZipIOBlockManager.cs
- TextRange.cs
- TimeoutValidationAttribute.cs
- SoapSchemaMember.cs
- StickyNote.cs
- AnnotationService.cs
- embossbitmapeffect.cs
- DoubleLinkList.cs
- ArithmeticException.cs
- DataTableMappingCollection.cs
- X509CertificateCollection.cs
- DesignerExtenders.cs
- CacheManager.cs
- SchemaName.cs
- Conditional.cs
- OracleConnectionFactory.cs
- PropertyEmitter.cs
- Point3DAnimation.cs
- SortDescription.cs
- PropertyDescriptor.cs
- WindowsGraphicsCacheManager.cs
- TempFiles.cs
- QilUnary.cs
- StorageMappingItemLoader.cs
- TreeIterators.cs
- WebServiceTypeData.cs
- SubMenuStyle.cs
- BufferedOutputStream.cs
- SiteMap.cs
- EnumConverter.cs
- HtmlInputHidden.cs
- PlatformNotSupportedException.cs
- sqlcontext.cs
- StringConverter.cs
- Serializer.cs
- EntityParameterCollection.cs
- PhonemeEventArgs.cs
- CompilerWrapper.cs
- CacheOutputQuery.cs
- FrameDimension.cs
- DataGridViewComboBoxColumn.cs
- WebPermission.cs
- HttpRequestContext.cs
- WebPartConnectionsCancelEventArgs.cs
- securitymgrsite.cs
- WorkflowInstanceExtensionProvider.cs
- DefaultAssemblyResolver.cs
- NativeRightsManagementAPIsStructures.cs
- ColorTransformHelper.cs
- DecimalConverter.cs