Code:
/ DotNET / DotNET / 8.0 / untmp / whidbey / REDBITS / ndp / fx / src / Designer / WebForms / System / Web / UI / Design / WebControls / XmlDesignerDataSourceView.cs / 1 / XmlDesignerDataSourceView.cs
//------------------------------------------------------------------------------ //// Copyright (c) Microsoft Corporation. All rights reserved. // //----------------------------------------------------------------------------- namespace System.Web.UI.Design.WebControls { using System; using System.Collections; using System.Diagnostics; using System.Web.UI.WebControls; ////// XmlDesignerDataSourceView is the designer view associated with a XmlDataSourceDesigner. /// [System.Security.Permissions.SecurityPermission(System.Security.Permissions.SecurityAction.Demand, Flags = System.Security.Permissions.SecurityPermissionFlag.UnmanagedCode)] public class XmlDesignerDataSourceView : DesignerDataSourceView { private XmlDataSourceDesigner _owner; public XmlDesignerDataSourceView(XmlDataSourceDesigner owner, string viewName) : base(owner, viewName) { _owner = owner; } public override IDataSourceViewSchema Schema { get { XmlDataSource xmlDataSource = _owner.GetDesignTimeXmlDataSource(String.Empty); if (xmlDataSource == null) { return null; } string xPath = xmlDataSource.XPath; if (xPath.Length == 0) { xPath = "/node()/node()"; } IDataSourceSchema schema = new XmlDocumentSchema(xmlDataSource.GetXmlDocument(), xPath); if (schema != null) { IDataSourceViewSchema[] viewSchemas = schema.GetViews(); if ((viewSchemas != null) && (viewSchemas.Length > 0)) { return viewSchemas[0]; } } return null; } } public override IEnumerable GetDesignTimeData(int minimumRows, out bool isSampleData) { // First try to use the runtime control to load actual data IEnumerable runtimeData = _owner.GetRuntimeEnumerable(Name); if (runtimeData != null) { // Runtime data was loaded, return it isSampleData = false; return runtimeData; } // No design time data could be retrieved, show dummy data return base.GetDesignTimeData(minimumRows, out isSampleData); } } } // 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
- safex509handles.cs
- EnumConverter.cs
- PriorityBindingExpression.cs
- SourceLineInfo.cs
- DesignerTransaction.cs
- WebPartDescription.cs
- MachineKeySection.cs
- UpdateTracker.cs
- SafeFileMapViewHandle.cs
- NetStream.cs
- ServiceModelSecurityTokenTypes.cs
- PEFileEvidenceFactory.cs
- BaseTemplateParser.cs
- ContextDataSourceView.cs
- ModelPropertyImpl.cs
- LabelExpression.cs
- LZCodec.cs
- TraceHandler.cs
- FilterException.cs
- TableParaClient.cs
- DescendantQuery.cs
- TextEditorDragDrop.cs
- HMACSHA256.cs
- FixedBufferAttribute.cs
- ProjectionNode.cs
- RepeatButton.cs
- Html32TextWriter.cs
- KeyboardNavigation.cs
- CodeCommentStatementCollection.cs
- TextFormatter.cs
- OrderPreservingPipeliningSpoolingTask.cs
- Command.cs
- CookieParameter.cs
- SchemaNamespaceManager.cs
- WebServiceMethodData.cs
- WorkflowMarkupSerializationException.cs
- Int64AnimationBase.cs
- DesignerActionUI.cs
- BitmapSourceSafeMILHandle.cs
- StylusPointProperty.cs
- XmlSchemaFacet.cs
- SiteMapDataSourceView.cs
- Section.cs
- ActiveXContainer.cs
- TextBoxDesigner.cs
- ObfuscationAttribute.cs
- LocalizedNameDescriptionPair.cs
- IdentityValidationException.cs
- PropertyTabAttribute.cs
- OrderPreservingSpoolingTask.cs
- SelectionEditingBehavior.cs
- XmlAttributeCollection.cs
- ClientRuntimeConfig.cs
- updatecommandorderer.cs
- HTTPAPI_VERSION.cs
- HebrewCalendar.cs
- Accessors.cs
- ShortcutKeysEditor.cs
- WebAdminConfigurationHelper.cs
- ProbeDuplex11AsyncResult.cs
- OciHandle.cs
- BaseConfigurationRecord.cs
- CheckBoxField.cs
- FontWeight.cs
- Int32AnimationUsingKeyFrames.cs
- PreviewKeyDownEventArgs.cs
- QuadraticBezierSegment.cs
- ChangeTracker.cs
- CodeExpressionCollection.cs
- BuildProvider.cs
- ByteStack.cs
- TriggerActionCollection.cs
- HelpInfo.cs
- HitTestWithGeometryDrawingContextWalker.cs
- HwndSourceKeyboardInputSite.cs
- WinOEToolBoxItem.cs
- WindowHideOrCloseTracker.cs
- GACIdentityPermission.cs
- PseudoWebRequest.cs
- GridProviderWrapper.cs
- SRef.cs
- AuthenticationConfig.cs
- StructuralCache.cs
- CompositeKey.cs
- TCPClient.cs
- DbReferenceCollection.cs
- TextDataBindingHandler.cs
- CryptoConfig.cs
- PropertyValueUIItem.cs
- CompositeClientFormatter.cs
- _SafeNetHandles.cs
- CookieProtection.cs
- ComplexType.cs
- SmtpDigestAuthenticationModule.cs
- NavigationPropertyEmitter.cs
- CommonDialog.cs
- SecurityTokenSerializer.cs
- InProcStateClientManager.cs
- IsolatedStoragePermission.cs
- DescendentsWalkerBase.cs