Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / System / data / design / RelationHandler.cs / 2 / RelationHandler.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All Rights Reserved. // Information Contained Herein is Proprietary and Confidential. // //----------------------------------------------------------------------------- namespace System.Data.Design { using System; using System.CodeDom; using System.Collections; using System.ComponentModel; using System.Data; internal sealed class RelationHandler { private TypedDataSourceCodeGenerator codeGenerator = null; private DesignRelationCollection relations = null; internal RelationHandler(TypedDataSourceCodeGenerator codeGenerator, DesignRelationCollection relations) { this.codeGenerator = codeGenerator; this.relations = relations; } internal DesignRelationCollection Relations { get { return relations; } } internal void AddPrivateVars(CodeTypeDeclaration dataSourceClass) { if(dataSourceClass == null) { throw new InternalException("DataSource CodeTypeDeclaration should not be null."); } if( relations == null ) { return; } foreach(DesignRelation relation in relations) { if(relation.DataRelation != null) { //\\ private DataRelationstring relationVariableName = relation.GeneratorRelationVarName; dataSourceClass.Members.Add( CodeGenHelper.FieldDecl(CodeGenHelper.GlobalType(typeof(System.Data.DataRelation)), relationVariableName) ); } } } } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- ConfigsHelper.cs
- TimelineCollection.cs
- MappingSource.cs
- InvalidAsynchronousStateException.cs
- TemplateControlBuildProvider.cs
- TimeIntervalCollection.cs
- ZoneIdentityPermission.cs
- KerberosReceiverSecurityToken.cs
- X509Utils.cs
- XmlWellformedWriter.cs
- LabelEditEvent.cs
- StateManagedCollection.cs
- ErrorTableItemStyle.cs
- SwitchElementsCollection.cs
- UrlMappingsModule.cs
- C14NUtil.cs
- PathData.cs
- ReservationNotFoundException.cs
- RepeatBehavior.cs
- AndMessageFilter.cs
- WindowsToolbar.cs
- HttpRequestCacheValidator.cs
- CodeBlockBuilder.cs
- Set.cs
- PlatformCulture.cs
- IsolatedStorageFilePermission.cs
- CapabilitiesUse.cs
- DbTransaction.cs
- SignedPkcs7.cs
- CatalogZoneDesigner.cs
- GlyphInfoList.cs
- Section.cs
- Condition.cs
- MetadataElement.cs
- TransactionBridgeSection.cs
- ObjectConverter.cs
- ClassHandlersStore.cs
- SplitterPanel.cs
- ActivationServices.cs
- FilterElement.cs
- MatchAttribute.cs
- File.cs
- BoundingRectTracker.cs
- DataReceivedEventArgs.cs
- OperationCanceledException.cs
- WindowsListViewItem.cs
- ValidationErrorCollection.cs
- TypePresenter.xaml.cs
- StrongNameMembershipCondition.cs
- Int64Storage.cs
- OraclePermission.cs
- IteratorFilter.cs
- FtpWebResponse.cs
- RotationValidation.cs
- BuildProviderUtils.cs
- XmlValueConverter.cs
- PingOptions.cs
- WindowsProgressbar.cs
- NotCondition.cs
- InternalResources.cs
- TranslateTransform3D.cs
- HttpHandlerAction.cs
- ExternalException.cs
- AppDomainAttributes.cs
- SystemDiagnosticsSection.cs
- SettingsPropertyValueCollection.cs
- ApplicationProxyInternal.cs
- XPathNode.cs
- OverlappedAsyncResult.cs
- TextEditorTyping.cs
- ExtenderProviderService.cs
- StaticFileHandler.cs
- XmlILIndex.cs
- EventRecord.cs
- DataGridViewTopRowAccessibleObject.cs
- ResourceProperty.cs
- Crc32Helper.cs
- TableRowCollection.cs
- DynamicQueryableWrapper.cs
- RemoteWebConfigurationHost.cs
- SessionEndedEventArgs.cs
- DataTableClearEvent.cs
- UnauthorizedAccessException.cs
- StyleBamlRecordReader.cs
- DefaultPropertyAttribute.cs
- IsolatedStoragePermission.cs
- SchemaTableColumn.cs
- ListViewDeleteEventArgs.cs
- precedingsibling.cs
- CachedBitmap.cs
- AsyncDataRequest.cs
- PathGeometry.cs
- Memoizer.cs
- GrowingArray.cs
- ErrorItem.cs
- XmlNodeList.cs
- CommandExpr.cs
- TextBox.cs
- MetafileEditor.cs
- IntSecurity.cs