Code:
/ Dotnetfx_Vista_SP2 / Dotnetfx_Vista_SP2 / 8.0.50727.4016 / DEVDIV / depot / DevDiv / releases / whidbey / NetFxQFE / ndp / fx / src / WinForms / Managed / System / WinForms / ListManagerBindingsCollection.cs / 1 / ListManagerBindingsCollection.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; using Microsoft.Win32; using System.Diagnostics; using System.ComponentModel; using System.Collections; ////// /// BindingsCollection is a collection of bindings for a Control. It has Add/Remove capabilities, /// as well as an All array property, enumeration, etc. /// [DefaultEvent("CollectionChanged")] internal class ListManagerBindingsCollection : BindingsCollection { private BindingManagerBase bindingManagerBase; ////// /// ColumnsCollection constructor. Used only by DataSource. /// internal ListManagerBindingsCollection(BindingManagerBase bindingManagerBase) : base() { Debug.Assert(bindingManagerBase != null, "How could a listmanagerbindingscollection not have a bindingManagerBase associated with it!"); this.bindingManagerBase = bindingManagerBase; } protected override void AddCore(Binding dataBinding) { if (dataBinding == null) throw new ArgumentNullException("dataBinding"); if (dataBinding.BindingManagerBase == bindingManagerBase) throw new ArgumentException(SR.GetString(SR.BindingsCollectionAdd1), "dataBinding"); if (dataBinding.BindingManagerBase != null) throw new ArgumentException(SR.GetString(SR.BindingsCollectionAdd2), "dataBinding"); // important to set prop first for error checking. dataBinding.SetListManager(bindingManagerBase); base.AddCore(dataBinding); } protected override void ClearCore() { int numLinks = Count; for (int i = 0; i < numLinks; i++) { Binding dataBinding = this[i]; dataBinding.SetListManager(null); } base.ClearCore(); } protected override void RemoveCore(Binding dataBinding) { if (dataBinding.BindingManagerBase != bindingManagerBase) throw new ArgumentException(SR.GetString(SR.BindingsCollectionForeign)); dataBinding.SetListManager(null); base.RemoveCore(dataBinding); } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. //------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Windows.Forms { using System; using Microsoft.Win32; using System.Diagnostics; using System.ComponentModel; using System.Collections; ////// /// BindingsCollection is a collection of bindings for a Control. It has Add/Remove capabilities, /// as well as an All array property, enumeration, etc. /// [DefaultEvent("CollectionChanged")] internal class ListManagerBindingsCollection : BindingsCollection { private BindingManagerBase bindingManagerBase; ////// /// ColumnsCollection constructor. Used only by DataSource. /// internal ListManagerBindingsCollection(BindingManagerBase bindingManagerBase) : base() { Debug.Assert(bindingManagerBase != null, "How could a listmanagerbindingscollection not have a bindingManagerBase associated with it!"); this.bindingManagerBase = bindingManagerBase; } protected override void AddCore(Binding dataBinding) { if (dataBinding == null) throw new ArgumentNullException("dataBinding"); if (dataBinding.BindingManagerBase == bindingManagerBase) throw new ArgumentException(SR.GetString(SR.BindingsCollectionAdd1), "dataBinding"); if (dataBinding.BindingManagerBase != null) throw new ArgumentException(SR.GetString(SR.BindingsCollectionAdd2), "dataBinding"); // important to set prop first for error checking. dataBinding.SetListManager(bindingManagerBase); base.AddCore(dataBinding); } protected override void ClearCore() { int numLinks = Count; for (int i = 0; i < numLinks; i++) { Binding dataBinding = this[i]; dataBinding.SetListManager(null); } base.ClearCore(); } protected override void RemoveCore(Binding dataBinding) { if (dataBinding.BindingManagerBase != bindingManagerBase) throw new ArgumentException(SR.GetString(SR.BindingsCollectionForeign)); dataBinding.SetListManager(null); base.RemoveCore(dataBinding); } } } // 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
- ParameterCollection.cs
- SamlAttributeStatement.cs
- QilInvoke.cs
- XmlSchemaIdentityConstraint.cs
- PasswordTextContainer.cs
- ToolStripDropDownButton.cs
- DataGridViewColumn.cs
- SqlUtils.cs
- DataGridViewColumnHeaderCell.cs
- ReadOnlyState.cs
- ToolConsole.cs
- MenuCommand.cs
- VectorAnimation.cs
- DBSqlParserColumnCollection.cs
- VisualTreeFlattener.cs
- PenThreadPool.cs
- CollectionViewGroupInternal.cs
- XmlUtil.cs
- HostingEnvironmentException.cs
- KeyPullup.cs
- DropDownButton.cs
- AutomationPropertyInfo.cs
- StorageEntitySetMapping.cs
- HtmlContainerControl.cs
- TemplateKey.cs
- HtmlFormWrapper.cs
- FamilyMap.cs
- DesignerCommandAdapter.cs
- ProgressiveCrcCalculatingStream.cs
- baseaxisquery.cs
- FlowDocumentView.cs
- Geometry.cs
- TaskFormBase.cs
- BaseCodePageEncoding.cs
- Compiler.cs
- Formatter.cs
- StyleBamlRecordReader.cs
- ImageIndexConverter.cs
- UriScheme.cs
- ChannelDispatcher.cs
- ReferencedType.cs
- NetDataContractSerializer.cs
- EditorZoneDesigner.cs
- MediaTimeline.cs
- DataSourceDescriptorCollection.cs
- FileNotFoundException.cs
- PerspectiveCamera.cs
- VisualStyleTypesAndProperties.cs
- StrokeIntersection.cs
- AnonymousIdentificationModule.cs
- EventRecordWrittenEventArgs.cs
- SupportingTokenSecurityTokenResolver.cs
- KeyBinding.cs
- CustomTypeDescriptor.cs
- MonitorWrapper.cs
- QilPatternFactory.cs
- BypassElementCollection.cs
- CodeMemberField.cs
- CodeDomDesignerLoader.cs
- MouseBinding.cs
- ParseElementCollection.cs
- ProgressBar.cs
- cookie.cs
- PassportAuthenticationModule.cs
- FixedSOMPage.cs
- WithParamAction.cs
- Rfc2898DeriveBytes.cs
- ThousandthOfEmRealPoints.cs
- CommandBindingCollection.cs
- WindowsTitleBar.cs
- SqlUtils.cs
- CorrelationHandle.cs
- WindowsRichEdit.cs
- Label.cs
- JoinElimination.cs
- DiscoveryDocumentSerializer.cs
- Char.cs
- HTTPNotFoundHandler.cs
- ArgumentReference.cs
- OracleInternalConnection.cs
- QueryExpression.cs
- DataGridCommandEventArgs.cs
- ReadOnlyDataSourceView.cs
- CalendarItem.cs
- ReflectionHelper.cs
- EdmProviderManifest.cs
- PropertyPath.cs
- X509Certificate.cs
- LeafCellTreeNode.cs
- InlineCollection.cs
- DecoderBestFitFallback.cs
- XmlDictionaryWriter.cs
- DataChangedEventManager.cs
- ImageAutomationPeer.cs
- PointValueSerializer.cs
- WorkflowTerminatedException.cs
- VirtualizedContainerService.cs
- ConfigXmlSignificantWhitespace.cs
- ScrollPattern.cs
- ThreadSafeList.cs