Code:
/ FX-1434 / FX-1434 / 1.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / System / data / design / TypedRowHandler.cs / 1 / TypedRowHandler.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;
using System.Reflection;
internal sealed class TypedRowHandler {
private TypedDataSourceCodeGenerator codeGenerator = null;
private DesignTableCollection tables = null;
private TypedRowGenerator rowGenerator = null;
internal TypedRowHandler(TypedDataSourceCodeGenerator codeGenerator, DesignTableCollection tables) {
this.codeGenerator = codeGenerator;
this.tables = tables;
this.rowGenerator = new TypedRowGenerator(codeGenerator);
}
internal TypedRowGenerator RowGenerator {
get {
return rowGenerator;
}
}
internal void AddTypedRowEvents(CodeTypeDeclaration dataTableClass, string tableName) {
DesignTable designTable = codeGenerator.TableHandler.Tables[tableName];
string rowClassName = designTable.GeneratorRowClassName;
string rowEventHandlerName = designTable.GeneratorRowEvHandlerName;
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowChangingName
)
);
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowChangedName
)
);
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowDeletingName
)
);
dataTableClass.Members.Add(
CodeGenHelper.EventDecl(
rowEventHandlerName,
designTable.GeneratorRowDeletedName
)
);
}
internal void AddTypedRows(CodeTypeDeclaration dataSourceClass) {
rowGenerator.GenerateRows(dataSourceClass);
}
internal void AddTypedRowEventHandlers(CodeTypeDeclaration dataSourceClass) {
rowGenerator.GenerateTypedRowEventHandlers(dataSourceClass);
}
internal void AddTypedRowEventArgs(CodeTypeDeclaration dataSourceClass) {
rowGenerator.GenerateTypedRowEventArgs(dataSourceClass);
}
}
}
// 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
- DataGridViewImageCell.cs
- BitmapFrame.cs
- NativeRightsManagementAPIsStructures.cs
- IndexOutOfRangeException.cs
- FeatureSupport.cs
- MetadataElement.cs
- CompilationPass2TaskInternal.cs
- GridViewRowPresenterBase.cs
- AttachmentService.cs
- XmlSerializationWriter.cs
- ReaderWriterLockSlim.cs
- WebPartConnectionsCancelVerb.cs
- XmlNamedNodeMap.cs
- dsa.cs
- NullableConverter.cs
- WaitForChangedResult.cs
- DataGridViewDataConnection.cs
- UInt64.cs
- FixedSOMPageElement.cs
- DataGridViewCellMouseEventArgs.cs
- MarginsConverter.cs
- FormViewInsertedEventArgs.cs
- InternalResources.cs
- CodeDomSerializerException.cs
- Bits.cs
- ArrangedElement.cs
- PerformanceCounterCategory.cs
- DataServices.cs
- ToolboxCategory.cs
- ProcessMessagesAsyncResult.cs
- InvokerUtil.cs
- WebConvert.cs
- SourceSwitch.cs
- DataGridLength.cs
- ChangePassword.cs
- WebPartRestoreVerb.cs
- CodeMethodInvokeExpression.cs
- BinaryNode.cs
- DifferencingCollection.cs
- Column.cs
- EmptyWithCancelationCheckWorkItem.cs
- EventLogStatus.cs
- COM2PropertyBuilderUITypeEditor.cs
- HttpPostLocalhostServerProtocol.cs
- RSAPKCS1KeyExchangeFormatter.cs
- Win32.cs
- DataPagerFieldCollection.cs
- RenamedEventArgs.cs
- UiaCoreApi.cs
- NetworkInterface.cs
- Vector.cs
- TaskFileService.cs
- HelpEvent.cs
- AssemblyUtil.cs
- WpfWebRequestHelper.cs
- ForwardPositionQuery.cs
- Environment.cs
- CLRBindingWorker.cs
- DirectoryObjectSecurity.cs
- WpfMemberInvoker.cs
- TabletCollection.cs
- StringBuilder.cs
- DetailsView.cs
- TypeExtension.cs
- DataRowChangeEvent.cs
- WebPartRestoreVerb.cs
- WebCategoryAttribute.cs
- MD5HashHelper.cs
- PnrpPermission.cs
- PolicyLevel.cs
- FamilyMapCollection.cs
- XamlToRtfWriter.cs
- CustomTypeDescriptor.cs
- SrgsNameValueTag.cs
- InternalDispatchObject.cs
- BackStopAuthenticationModule.cs
- GenericIdentity.cs
- PTConverter.cs
- CultureTable.cs
- ResourceLoader.cs
- InvalidEnumArgumentException.cs
- SignatureHelper.cs
- webbrowsersite.cs
- DeploymentSection.cs
- CriticalHandle.cs
- FrugalMap.cs
- MetadataSerializer.cs
- BaseParaClient.cs
- StylusPointCollection.cs
- NavigationFailedEventArgs.cs
- DesignerDataView.cs
- cookiecontainer.cs
- BitmapEffectvisualstate.cs
- ProvidersHelper.cs
- _NativeSSPI.cs
- DataBindingExpressionBuilder.cs
- SpeechRecognitionEngine.cs
- WebPartTracker.cs
- webproxy.cs
- PrefixHandle.cs