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
- ControlCachePolicy.cs
- TemplateApplicationHelper.cs
- RootDesignerSerializerAttribute.cs
- OdbcDataReader.cs
- SystemIPInterfaceStatistics.cs
- ExtenderControl.cs
- CultureTable.cs
- DataKeyCollection.cs
- CompatibleIComparer.cs
- _AutoWebProxyScriptWrapper.cs
- HandleRef.cs
- KeyToListMap.cs
- MobileListItem.cs
- MenuItemBinding.cs
- ExtensionQuery.cs
- XmlSchemaIdentityConstraint.cs
- DebuggerAttributes.cs
- HtmlButton.cs
- Color.cs
- WhitespaceRuleReader.cs
- BaseTemplateBuildProvider.cs
- ToolboxDataAttribute.cs
- SoapObjectReader.cs
- DataControlPagerLinkButton.cs
- SourceSwitch.cs
- PrivilegedConfigurationManager.cs
- StringDictionary.cs
- SoapDocumentMethodAttribute.cs
- PathGeometry.cs
- Pkcs9Attribute.cs
- SiteMapPath.cs
- X509WindowsSecurityToken.cs
- ManipulationInertiaStartingEventArgs.cs
- DataGridRow.cs
- TreeNodeStyle.cs
- OutputCacheModule.cs
- ComplexTypeEmitter.cs
- _ScatterGatherBuffers.cs
- Int16AnimationBase.cs
- CodeAttachEventStatement.cs
- ReverseInheritProperty.cs
- ConsoleTraceListener.cs
- __FastResourceComparer.cs
- ColorConvertedBitmap.cs
- PerfService.cs
- AvTrace.cs
- TransformedBitmap.cs
- X509Chain.cs
- TextRunCache.cs
- SpeakInfo.cs
- HttpApplicationStateBase.cs
- IOException.cs
- Configuration.cs
- ContractMapping.cs
- KeyedByTypeCollection.cs
- Semaphore.cs
- MethodMessage.cs
- HashSetEqualityComparer.cs
- RunWorkerCompletedEventArgs.cs
- ApplicationFileCodeDomTreeGenerator.cs
- ToolBarTray.cs
- ConsoleKeyInfo.cs
- BamlStream.cs
- XmlBoundElement.cs
- NegatedConstant.cs
- PenThreadWorker.cs
- Atom10FormatterFactory.cs
- ConnectivityStatus.cs
- ShaperBuffers.cs
- SequenceFullException.cs
- Schema.cs
- SortQuery.cs
- XmlTextAttribute.cs
- ChannelManager.cs
- DetailsViewModeEventArgs.cs
- TemplatePartAttribute.cs
- SingleKeyFrameCollection.cs
- LayoutEditorPart.cs
- HtmlEncodedRawTextWriter.cs
- StylusOverProperty.cs
- ColumnResizeAdorner.cs
- XPathMultyIterator.cs
- TransactionTable.cs
- MappingModelBuildProvider.cs
- SqlFlattener.cs
- MemoryStream.cs
- WeakReferenceKey.cs
- EntityStoreSchemaGenerator.cs
- SignedInfo.cs
- AutoGeneratedField.cs
- OracleParameterCollection.cs
- StyleCollection.cs
- DataGridViewCellCancelEventArgs.cs
- SiteMapProvider.cs
- WorkflowIdleElement.cs
- ToolStripContentPanelRenderEventArgs.cs
- TrackingMemoryStream.cs
- TemplateKeyConverter.cs
- DBConnection.cs
- ExpressionWriter.cs