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
- CodePageEncoding.cs
- SqlProviderManifest.cs
- MetabaseServerConfig.cs
- PreparingEnlistment.cs
- StyleXamlParser.cs
- ComplexTypeEmitter.cs
- TabControlEvent.cs
- CodeDelegateCreateExpression.cs
- DbUpdateCommandTree.cs
- HiddenFieldPageStatePersister.cs
- Attributes.cs
- ListViewTableCell.cs
- DataTableTypeConverter.cs
- DiffuseMaterial.cs
- ObjectPersistData.cs
- WS2007HttpBindingCollectionElement.cs
- WorkflowWebHostingModule.cs
- ConnectivityStatus.cs
- FormViewUpdatedEventArgs.cs
- MonitorWrapper.cs
- JsonReader.cs
- SqlRecordBuffer.cs
- PeerCollaborationPermission.cs
- Pens.cs
- KerberosSecurityTokenProvider.cs
- GridViewColumn.cs
- DataControlPagerLinkButton.cs
- RectAnimationUsingKeyFrames.cs
- SimpleTextLine.cs
- UiaCoreApi.cs
- UnauthorizedWebPart.cs
- WaitForChangedResult.cs
- BinaryObjectWriter.cs
- HandleRef.cs
- XomlDesignerLoader.cs
- WeakHashtable.cs
- AggregationMinMaxHelpers.cs
- FrameworkContentElement.cs
- WebFormDesignerActionService.cs
- PriorityRange.cs
- WindowsServiceElement.cs
- IdnElement.cs
- AssemblyBuilder.cs
- BuilderPropertyEntry.cs
- NonceCache.cs
- AsymmetricSignatureFormatter.cs
- PropertyGeneratedEventArgs.cs
- _LocalDataStoreMgr.cs
- CommonXSendMessage.cs
- Token.cs
- AdornerDecorator.cs
- LinqDataSourceHelper.cs
- KnownBoxes.cs
- x509store.cs
- HwndProxyElementProvider.cs
- ConnectionManagementElement.cs
- PeerNameRecord.cs
- NotCondition.cs
- HttpClientProtocol.cs
- WorkItem.cs
- ListViewTableCell.cs
- NameValueSectionHandler.cs
- DataViewManager.cs
- PrintDocument.cs
- DesignerCategoryAttribute.cs
- ListViewItem.cs
- AutomationIdentifier.cs
- DriveInfo.cs
- XamlGridLengthSerializer.cs
- QuaternionKeyFrameCollection.cs
- EventBuilder.cs
- PropertyMap.cs
- CodeIdentifier.cs
- PropertyGrid.cs
- FontFamilyIdentifier.cs
- PolicyChain.cs
- util.cs
- WmlPhoneCallAdapter.cs
- AVElementHelper.cs
- ApplicationDirectory.cs
- Root.cs
- RTTypeWrapper.cs
- AppDomainProtocolHandler.cs
- IgnoreSectionHandler.cs
- FileRegion.cs
- ToolbarAUtomationPeer.cs
- DataGridViewComboBoxCell.cs
- Duration.cs
- ErasingStroke.cs
- RijndaelManaged.cs
- HttpHandlerAction.cs
- FormatterServices.cs
- TableRowCollection.cs
- DBSqlParserColumn.cs
- InfoCardRSAOAEPKeyExchangeDeformatter.cs
- X509Certificate2Collection.cs
- DataServiceClientException.cs
- TreeNodeSelectionProcessor.cs
- Win32Exception.cs
- AssertFilter.cs