Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Data / System / Data / CodeGen / StrongTypingException.cs / 1 / StrongTypingException.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //[....] //[....] //[....] //----------------------------------------------------------------------------- namespace System.Data { using System; using System.Collections; using System.Data; using System.Runtime.Serialization; ////// [Serializable] #if WINFSInternalOnly internal #else public #endif class StrongTypingException : DataException { protected StrongTypingException(SerializationInfo info, StreamingContext context) : base(info, context) { } ///DEV: The exception that is throwing from strong typed DataSet when user access to DBNull value. ////// public StrongTypingException() : base() { HResult = HResults.StrongTyping; } public StrongTypingException(string message) : base(message) { HResult = HResults.StrongTyping; } ///[To be supplied.] ////// public StrongTypingException(string s, Exception innerException) : base(s, innerException) { HResult = HResults.StrongTyping; } } ///[To be supplied.] ////// [Serializable] #if WINFSInternalOnly internal #else public #endif class TypedDataSetGeneratorException : DataException { private ArrayList errorList; private string KEY_ARRAYCOUNT = "KEY_ARRAYCOUNT"; private string KEY_ARRAYVALUES = "KEY_ARRAYVALUES"; protected TypedDataSetGeneratorException(SerializationInfo info, StreamingContext context) : base(info, context) { int count = (int) info.GetValue(KEY_ARRAYCOUNT, typeof(System.Int32)); if (count > 0) { errorList = new ArrayList(); for (int i = 0; i < count; i++) { errorList.Add(info.GetValue(KEY_ARRAYVALUES + i, typeof(System.String))); } } else errorList = null; } ///DEV: The exception that is throwing in generating strong typed DataSet when name conflict happens. ////// public TypedDataSetGeneratorException() : base() { errorList = null; HResult = HResults.StrongTyping; } public TypedDataSetGeneratorException(string message) : base(message) { HResult = HResults.StrongTyping; } public TypedDataSetGeneratorException(string message, Exception innerException) : base(message, innerException) { HResult = HResults.StrongTyping; } ///[To be supplied.] ////// public TypedDataSetGeneratorException(ArrayList list) : this() { errorList = list; HResult = HResults.StrongTyping; } ///[To be supplied.] ////// public ArrayList ErrorList { get { return errorList; } } [System.Security.Permissions.SecurityPermissionAttribute(System.Security.Permissions.SecurityAction.LinkDemand, Flags=System.Security.Permissions.SecurityPermissionFlag.SerializationFormatter)] public override void GetObjectData(SerializationInfo info, StreamingContext context) { base.GetObjectData(info, context); if (errorList != null) { info.AddValue(KEY_ARRAYCOUNT, errorList.Count); for (int i = 0; i < errorList.Count; i++) { info.AddValue(KEY_ARRAYVALUES + i, errorList[i].ToString()); } } else { info.AddValue(KEY_ARRAYCOUNT, 0); } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.[To be supplied.] ///
Link Menu
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- InputMethodStateChangeEventArgs.cs
- FlatButtonAppearance.cs
- ClientCultureInfo.cs
- SqlLiftWhereClauses.cs
- SspiHelper.cs
- FlowDocumentPageViewerAutomationPeer.cs
- TranslateTransform.cs
- RestClientProxyHandler.cs
- PassportAuthentication.cs
- TextEditorSpelling.cs
- PropertyNames.cs
- RemoteTokenFactory.cs
- ResourceBinder.cs
- Int32Collection.cs
- CustomAssemblyResolver.cs
- TextServicesCompartmentContext.cs
- ApplicationActivator.cs
- ParenthesizePropertyNameAttribute.cs
- PolyQuadraticBezierSegment.cs
- Attributes.cs
- DbConnectionPoolOptions.cs
- ModelFunctionTypeElement.cs
- AssemblyAttributesGoHere.cs
- TiffBitmapDecoder.cs
- TextRangeProviderWrapper.cs
- SystemTcpStatistics.cs
- NavigatorOutput.cs
- DataRecordInfo.cs
- NameHandler.cs
- PropertyNames.cs
- DataTableNewRowEvent.cs
- ConnectionOrientedTransportBindingElement.cs
- ConnectionStringsExpressionBuilder.cs
- BackgroundWorker.cs
- CheckoutException.cs
- IndexerNameAttribute.cs
- ValidatedControlConverter.cs
- BaseParagraph.cs
- HttpException.cs
- CharConverter.cs
- OciLobLocator.cs
- FillErrorEventArgs.cs
- ProviderUtil.cs
- DBBindings.cs
- SignatureHelper.cs
- Track.cs
- ViewCellSlot.cs
- Cursor.cs
- ResourcesBuildProvider.cs
- AccessKeyManager.cs
- FileLogRecordEnumerator.cs
- QueryCacheEntry.cs
- ExtenderProvidedPropertyAttribute.cs
- XpsFilter.cs
- ArraySortHelper.cs
- Debug.cs
- PerfCounters.cs
- UserControlBuildProvider.cs
- CryptoKeySecurity.cs
- OdbcDataReader.cs
- PropertyMapper.cs
- ToolStripSplitStackLayout.cs
- TextAction.cs
- SecuritySessionServerSettings.cs
- CheckBoxFlatAdapter.cs
- StateChangeEvent.cs
- TargetException.cs
- ObjectConverter.cs
- XPathNodeList.cs
- CombinedHttpChannel.cs
- SmiEventSink.cs
- UIntPtr.cs
- SQLDoubleStorage.cs
- ResourceDisplayNameAttribute.cs
- Publisher.cs
- TextSyndicationContent.cs
- PresentationTraceSources.cs
- AsyncStreamReader.cs
- ConfigurationManagerHelper.cs
- RadioButtonList.cs
- ClientSideQueueItem.cs
- KeysConverter.cs
- RtfToXamlReader.cs
- StringDictionary.cs
- _AcceptOverlappedAsyncResult.cs
- ProxyHwnd.cs
- Marshal.cs
- TimeSpanSecondsOrInfiniteConverter.cs
- HtmlTextArea.cs
- ImpersonateTokenRef.cs
- SubqueryRules.cs
- BamlCollectionHolder.cs
- GenericPrincipal.cs
- TypeUtils.cs
- ActivityDelegate.cs
- CacheSection.cs
- ExpanderAutomationPeer.cs
- HtmlWindowCollection.cs
- FlowDocumentReader.cs
- UncommonField.cs