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
- DesignerImageAdapter.cs
- CollectionViewGroupInternal.cs
- GlyphRun.cs
- storepermission.cs
- WrappedReader.cs
- SystemIcmpV6Statistics.cs
- CoTaskMemHandle.cs
- ResourcesBuildProvider.cs
- NavigationService.cs
- APCustomTypeDescriptor.cs
- lengthconverter.cs
- CodeValidator.cs
- XpsFilter.cs
- DurationConverter.cs
- AdRotatorDesigner.cs
- XsltCompileContext.cs
- BindingManagerDataErrorEventArgs.cs
- HttpProfileBase.cs
- FrameworkContentElement.cs
- FixedPageAutomationPeer.cs
- Debug.cs
- ClientSettingsProvider.cs
- PartitionResolver.cs
- CqlErrorHelper.cs
- NativeMethods.cs
- XamlReader.cs
- ListViewGroupItemCollection.cs
- SqlDelegatedTransaction.cs
- MenuRenderer.cs
- InfoCardKeyedHashAlgorithm.cs
- FrameworkContentElement.cs
- KeyValueConfigurationCollection.cs
- JsonSerializer.cs
- StringUtil.cs
- ElementUtil.cs
- NumericUpDown.cs
- WebPartMenu.cs
- AnnouncementEndpointElement.cs
- Attribute.cs
- ExpandableObjectConverter.cs
- Timer.cs
- WindowsToolbarItemAsMenuItem.cs
- RichTextBoxConstants.cs
- ValuePattern.cs
- ReferencedAssembly.cs
- BamlTreeMap.cs
- RowType.cs
- TextParagraphCache.cs
- CompilationSection.cs
- HttpBrowserCapabilitiesWrapper.cs
- PatternMatcher.cs
- HelpInfo.cs
- ToolStripAdornerWindowService.cs
- SingleKeyFrameCollection.cs
- IgnoreDeviceFilterElement.cs
- HandledEventArgs.cs
- StorageConditionPropertyMapping.cs
- XmlDesigner.cs
- TextElementCollectionHelper.cs
- HttpPostedFileWrapper.cs
- PropertyGeneratedEventArgs.cs
- ComponentSerializationService.cs
- ChtmlPageAdapter.cs
- FlowNode.cs
- CheckBoxStandardAdapter.cs
- NumericUpDownAcceleration.cs
- MutexSecurity.cs
- DtrList.cs
- TextSelectionProcessor.cs
- TablePattern.cs
- XmlMembersMapping.cs
- WinEventQueueItem.cs
- LinkUtilities.cs
- Attributes.cs
- exports.cs
- NativeObjectSecurity.cs
- FigureHelper.cs
- ConvertersCollection.cs
- CodeTypeReferenceSerializer.cs
- ApplicationServiceHelper.cs
- CursorInteropHelper.cs
- ThreadStateException.cs
- MembershipSection.cs
- ExclusiveTcpTransportManager.cs
- SingleConverter.cs
- ZoneLinkButton.cs
- ParallelTimeline.cs
- XmlSequenceWriter.cs
- ContextMenuService.cs
- FormatterServices.cs
- EntitySetRetriever.cs
- TemplateBindingExpressionConverter.cs
- ObjectDataSourceView.cs
- ScriptingProfileServiceSection.cs
- MaskedTextBoxDesigner.cs
- CalculatedColumn.cs
- entityreference_tresulttype.cs
- ListSurrogate.cs
- SmtpNtlmAuthenticationModule.cs
- GridViewCellAutomationPeer.cs