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
- QilLiteral.cs
- SecurityCookieModeValidator.cs
- SamlSecurityTokenAuthenticator.cs
- HashSet.cs
- MarkupCompilePass2.cs
- RemoteHelper.cs
- DataGridrowEditEndingEventArgs.cs
- RootBuilder.cs
- ContentPlaceHolder.cs
- ToolStripStatusLabel.cs
- InkCanvas.cs
- AuthenticodeSignatureInformation.cs
- ImageKeyConverter.cs
- wgx_render.cs
- TextTreeFixupNode.cs
- EntityCommandExecutionException.cs
- SelectionPattern.cs
- ModelFunctionTypeElement.cs
- sqlcontext.cs
- ResponseStream.cs
- HtmlGenericControl.cs
- MenuEventArgs.cs
- SQLDecimalStorage.cs
- BuildProvidersCompiler.cs
- CompletedAsyncResult.cs
- ConfigurationSectionHelper.cs
- DisplayMemberTemplateSelector.cs
- DataGridItemCollection.cs
- SymbolTable.cs
- InstanceNameConverter.cs
- FtpRequestCacheValidator.cs
- DrawingContextDrawingContextWalker.cs
- RenderDataDrawingContext.cs
- GroupStyle.cs
- Action.cs
- RevocationPoint.cs
- TreeNodeBinding.cs
- WebBrowserNavigatingEventHandler.cs
- Trace.cs
- Vector.cs
- ObjectStateManagerMetadata.cs
- ParameterToken.cs
- newinstructionaction.cs
- PublisherIdentityPermission.cs
- ExtendedTransformFactory.cs
- CellQuery.cs
- TiffBitmapDecoder.cs
- TiffBitmapEncoder.cs
- NativeObjectSecurity.cs
- StaticFileHandler.cs
- FormViewPagerRow.cs
- HttpCachePolicyBase.cs
- ValueType.cs
- IisTraceListener.cs
- BlockCollection.cs
- Filter.cs
- DSASignatureFormatter.cs
- SymLanguageVendor.cs
- SHA1Managed.cs
- InternalsVisibleToAttribute.cs
- shaperfactoryquerycacheentry.cs
- InkCanvasAutomationPeer.cs
- Serializer.cs
- Italic.cs
- BooleanStorage.cs
- ElementUtil.cs
- PathGeometry.cs
- SHA1Managed.cs
- Button.cs
- BamlStream.cs
- Converter.cs
- SQLSingleStorage.cs
- SapiRecoContext.cs
- OSFeature.cs
- TransactionChannelListener.cs
- ToolStripGripRenderEventArgs.cs
- ClaimTypeElementCollection.cs
- documentsequencetextpointer.cs
- DodSequenceMerge.cs
- ColumnMapTranslator.cs
- GridViewPageEventArgs.cs
- FreeIndexList.cs
- ExpressionWriter.cs
- PermissionSetEnumerator.cs
- GroupBoxRenderer.cs
- ProxyDataContractResolver.cs
- HierarchicalDataBoundControlAdapter.cs
- FileVersion.cs
- EntityDataSourceChangingEventArgs.cs
- ArgumentOutOfRangeException.cs
- CodeIndexerExpression.cs
- URLMembershipCondition.cs
- ActiveXHelper.cs
- DrawingVisualDrawingContext.cs
- BufferModesCollection.cs
- UriExt.cs
- RenderData.cs
- Icon.cs
- FileNotFoundException.cs
- TextTrailingCharacterEllipsis.cs