Code:
/ FX-1434 / FX-1434 / 1.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
- RuntimeArgumentHandle.cs
- SecurityStandardsManager.cs
- SaveCardRequest.cs
- WindowProviderWrapper.cs
- ConnectionProviderAttribute.cs
- ExpressionWriter.cs
- RegisterResponseInfo.cs
- ILGenerator.cs
- AdornerPresentationContext.cs
- MatrixTransform3D.cs
- UndoEngine.cs
- InvokeDelegate.cs
- ContractInstanceProvider.cs
- SpellerStatusTable.cs
- StringFormat.cs
- HtmlValidationSummaryAdapter.cs
- HandlerBase.cs
- CompilerTypeWithParams.cs
- TextBoxAutomationPeer.cs
- GlobalizationAssembly.cs
- DefaultAsyncDataDispatcher.cs
- EdmSchemaError.cs
- DrawingVisual.cs
- NetworkInformationException.cs
- URI.cs
- HostVisual.cs
- SqlDependencyUtils.cs
- SocketException.cs
- ListControlBuilder.cs
- EnumUnknown.cs
- DBConnection.cs
- Point3DValueSerializer.cs
- MarkupObject.cs
- JoinGraph.cs
- PathFigure.cs
- Base64Encoder.cs
- FragmentQueryProcessor.cs
- XmlSchemaSimpleContentRestriction.cs
- CryptoStream.cs
- ConfigXmlElement.cs
- ViewgenContext.cs
- Instrumentation.cs
- DataSetMappper.cs
- XpsThumbnail.cs
- TiffBitmapDecoder.cs
- MailMessage.cs
- RangeValidator.cs
- DataTableTypeConverter.cs
- StatusBarDrawItemEvent.cs
- ResourceContainer.cs
- AdPostCacheSubstitution.cs
- CollaborationHelperFunctions.cs
- ClientSettingsSection.cs
- FormsAuthentication.cs
- DataBindingCollection.cs
- StructuralObject.cs
- CustomDictionarySources.cs
- CatchDesigner.xaml.cs
- SafeNativeMethods.cs
- LoadedOrUnloadedOperation.cs
- WebEventCodes.cs
- ToolStripItemCollection.cs
- DataServiceKeyAttribute.cs
- HMACSHA256.cs
- UnsafeNativeMethods.cs
- BidOverLoads.cs
- NamedPipeHostedTransportConfiguration.cs
- Subset.cs
- IndexerNameAttribute.cs
- CallContext.cs
- StatusBarDrawItemEvent.cs
- ListViewItemSelectionChangedEvent.cs
- OrCondition.cs
- PermissionListSet.cs
- TextSpan.cs
- EasingFunctionBase.cs
- SmtpException.cs
- UserInitiatedRoutedEventPermission.cs
- XmlReflectionMember.cs
- QuaternionRotation3D.cs
- XmlMapping.cs
- StdValidatorsAndConverters.cs
- BaseTemplateParser.cs
- PublisherIdentityPermission.cs
- FieldNameLookup.cs
- EDesignUtil.cs
- SelectionBorderGlyph.cs
- ClientScriptManager.cs
- WeakEventTable.cs
- RenderContext.cs
- StubHelpers.cs
- AuthenticationModulesSection.cs
- ActivatedMessageQueue.cs
- TextControlDesigner.cs
- HandlerBase.cs
- ColorTransformHelper.cs
- RemotingException.cs
- SimpleWorkerRequest.cs
- IPPacketInformation.cs
- XmlCharCheckingWriter.cs