Code:
/ Dotnetfx_Win7_3.5.1 / Dotnetfx_Win7_3.5.1 / 3.5.1 / DEVDIV / depot / DevDiv / releases / whidbey / NetFXspW7 / ndp / fx / src / xsp / System / Web / UI / WebControls / SiteMapDataSourceView.cs / 1 / SiteMapDataSourceView.cs
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System.Collections;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class SiteMapDataSourceView : DataSourceView {
private SiteMapNodeCollection _collection;
private SiteMapDataSource _owner;
public SiteMapDataSourceView(SiteMapDataSource owner, string name, SiteMapNode node) : base(owner, name) {
_owner = owner;
_collection = new SiteMapNodeCollection(node);
}
public SiteMapDataSourceView(SiteMapDataSource owner, string name, SiteMapNodeCollection collection) : base(owner, name) {
_owner = owner;
_collection = collection;
}
protected internal override IEnumerable ExecuteSelect(DataSourceSelectArguments arguments) {
arguments.RaiseUnsupportedCapabilitiesError(this);
return _collection;
}
protected override void OnDataSourceViewChanged(EventArgs e) {
_collection = _owner.GetPathNodeCollection(Name);
base.OnDataSourceViewChanged(e);
}
public IEnumerable Select(DataSourceSelectArguments arguments) {
return ExecuteSelect(arguments);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
//------------------------------------------------------------------------------
//
// Copyright (c) Microsoft Corporation. All rights reserved.
//
//-----------------------------------------------------------------------------
namespace System.Web.UI.WebControls {
using System.Collections;
using System.Security.Permissions;
using System.Web;
using System.Web.UI;
[AspNetHostingPermission(SecurityAction.LinkDemand, Level=AspNetHostingPermissionLevel.Minimal)]
[AspNetHostingPermission(SecurityAction.InheritanceDemand, Level=AspNetHostingPermissionLevel.Minimal)]
public class SiteMapDataSourceView : DataSourceView {
private SiteMapNodeCollection _collection;
private SiteMapDataSource _owner;
public SiteMapDataSourceView(SiteMapDataSource owner, string name, SiteMapNode node) : base(owner, name) {
_owner = owner;
_collection = new SiteMapNodeCollection(node);
}
public SiteMapDataSourceView(SiteMapDataSource owner, string name, SiteMapNodeCollection collection) : base(owner, name) {
_owner = owner;
_collection = collection;
}
protected internal override IEnumerable ExecuteSelect(DataSourceSelectArguments arguments) {
arguments.RaiseUnsupportedCapabilitiesError(this);
return _collection;
}
protected override void OnDataSourceViewChanged(EventArgs e) {
_collection = _owner.GetPathNodeCollection(Name);
base.OnDataSourceViewChanged(e);
}
public IEnumerable Select(DataSourceSelectArguments arguments) {
return ExecuteSelect(arguments);
}
}
}
// File provided for Reference Use Only by Microsoft Corporation (c) 2007.
Link Menu

This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- CodeDOMUtility.cs
- HttpCapabilitiesSectionHandler.cs
- X509SecurityToken.cs
- WebPart.cs
- TableParaClient.cs
- ColumnCollection.cs
- RowBinding.cs
- NativeCppClassAttribute.cs
- FontDialog.cs
- SafeRightsManagementEnvironmentHandle.cs
- LinqDataSourceEditData.cs
- BaseTemplateBuildProvider.cs
- SevenBitStream.cs
- XmlSchemaImporter.cs
- ModelPropertyCollectionImpl.cs
- ServiceProviders.cs
- FilePrompt.cs
- SqlDataSourceCache.cs
- ApplyImportsAction.cs
- WindowsSolidBrush.cs
- AuthorizationRule.cs
- EncoderNLS.cs
- BindingFormattingDialog.cs
- EncoderFallback.cs
- MemoryPressure.cs
- wgx_sdk_version.cs
- MulticastDelegate.cs
- PageSettings.cs
- Hyperlink.cs
- ICspAsymmetricAlgorithm.cs
- TreeNodeCollection.cs
- XmlWriterTraceListener.cs
- MetadataArtifactLoaderCompositeResource.cs
- DelegateTypeInfo.cs
- SHA384.cs
- DeflateEmulationStream.cs
- XmlSchema.cs
- Drawing.cs
- ProviderMetadataCachedInformation.cs
- SqlFileStream.cs
- DbProviderSpecificTypePropertyAttribute.cs
- WindowHideOrCloseTracker.cs
- TypeGeneratedEventArgs.cs
- SystemThemeKey.cs
- ToolBarButtonClickEvent.cs
- NonParentingControl.cs
- WebHostedComPlusServiceHost.cs
- NavigationCommands.cs
- PerformanceCounterPermissionEntryCollection.cs
- LinqToSqlWrapper.cs
- Profiler.cs
- X509CertificateCollection.cs
- ErrorsHelper.cs
- SerializationEventsCache.cs
- webclient.cs
- ContextMarshalException.cs
- CacheDependency.cs
- GridEntryCollection.cs
- CanonicalFontFamilyReference.cs
- ResourceExpressionBuilder.cs
- DispatchOperationRuntime.cs
- BinaryMessageEncodingBindingElement.cs
- CurrentTimeZone.cs
- Flowchart.cs
- ServicePerformanceCounters.cs
- OutputCacheProfile.cs
- FixedTextBuilder.cs
- RemotingAttributes.cs
- TextContainerChangeEventArgs.cs
- __Filters.cs
- HttpResponseHeader.cs
- Property.cs
- SystemIcons.cs
- ActivityPreviewDesigner.cs
- ModuleBuilderData.cs
- CacheModeConverter.cs
- Size3DValueSerializer.cs
- RtfToken.cs
- CapiSafeHandles.cs
- COAUTHINFO.cs
- Camera.cs
- TableColumn.cs
- XmlMemberMapping.cs
- Composition.cs
- ListenerChannelContext.cs
- ProcessHost.cs
- TextEditorTyping.cs
- EntityStoreSchemaGenerator.cs
- CfgSemanticTag.cs
- GenericEnumerator.cs
- MemberBinding.cs
- RequestCachePolicy.cs
- ReservationNotFoundException.cs
- IndexedString.cs
- Tuple.cs
- ReaderWriterLock.cs
- DataGridItemEventArgs.cs
- DeflateEmulationStream.cs
- ChannelManager.cs
- RoleGroupCollection.cs