Code:
/ 4.0 / 4.0 / DEVDIV_TFS / Dev10 / Releases / RTMRel / ndp / cdf / src / WF / RunTime / Tracking / TrackingExtract.cs / 1305376 / TrackingExtract.cs
using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; using System.Xml; using System.Xml.Schema; using System.IO; using System.Reflection; using System.Diagnostics; using System.Runtime.Serialization; using System.Security.Permissions; using System.Globalization; //using System.Workflow.Activities; using System.Workflow.ComponentModel; using System.Workflow.Runtime; using System.Workflow.Runtime.Hosting; using Hosting = System.Workflow.Runtime.Hosting; namespace System.Workflow.Runtime.Tracking { ////// Abstract base for classes that extract data /// [Serializable] public abstract class TrackingExtract { public abstract TrackingAnnotationCollection Annotations { get; } public abstract string Member { get; set; } internal abstract void GetData(Activity activity, IServiceProvider provider, IListitems); } /// /// Used to extract data members from a workflow's code separation partial class. /// [Serializable] public class WorkflowDataTrackingExtract : TrackingExtract { #region Private DataMembers private string _name = null; private TrackingAnnotationCollection _annotations = new TrackingAnnotationCollection(); #endregion #region Constructors ////// Default constructor. /// public WorkflowDataTrackingExtract() { } ////// Construct with a Member list. /// /// List of "." delineated property names public WorkflowDataTrackingExtract(string member) { _name = member; } #endregion #region TrackingExtract public override string Member { get { return _name; } set { _name = value; } } public override TrackingAnnotationCollection Annotations { get { return _annotations; } } internal override void GetData(Activity activity, IServiceProvider provider, IListitems) { Activity root = ContextActivityUtils.RootContextActivity(activity); if ((null == _name) || (0 == _name.Trim().Length)) { // // If we don't have a name we get everything PropertyHelper.GetAllMembers(root, items, _annotations); } else { TrackingDataItem item = null; PropertyHelper.GetProperty(_name, root, _annotations, out item); if (null != item) items.Add(item); } } #endregion } /// /// Used to extract data members from an activity in a workflow instance. /// [Serializable] public class ActivityDataTrackingExtract : TrackingExtract { #region Private DataMembers private string _name = null; private TrackingAnnotationCollection _annotations = new TrackingAnnotationCollection(); #endregion #region Constructors ////// Default constructor. /// public ActivityDataTrackingExtract() { } ////// Construct with a Member list. /// /// List of "." delineated property names public ActivityDataTrackingExtract(string member) { _name = member; } #endregion #region TrackingExtract public override string Member { get { return _name; } set { _name = value; } } public override TrackingAnnotationCollection Annotations { get { return _annotations; } } internal override void GetData(Activity activity, IServiceProvider provider, IListitems) { if ((null == _name) || (0 == _name.Trim().Length)) { // // If we don't have a name we get everything PropertyHelper.GetAllMembers(activity, items, _annotations); } else { TrackingDataItem item = null; PropertyHelper.GetProperty(_name, activity, _annotations, out item); if (null != item) items.Add(item); } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved. using System; using System.Collections; using System.Collections.Generic; using System.Collections.ObjectModel; using System.Text; using System.Xml; using System.Xml.Schema; using System.IO; using System.Reflection; using System.Diagnostics; using System.Runtime.Serialization; using System.Security.Permissions; using System.Globalization; //using System.Workflow.Activities; using System.Workflow.ComponentModel; using System.Workflow.Runtime; using System.Workflow.Runtime.Hosting; using Hosting = System.Workflow.Runtime.Hosting; namespace System.Workflow.Runtime.Tracking { /// /// Abstract base for classes that extract data /// [Serializable] public abstract class TrackingExtract { public abstract TrackingAnnotationCollection Annotations { get; } public abstract string Member { get; set; } internal abstract void GetData(Activity activity, IServiceProvider provider, IListitems); } /// /// Used to extract data members from a workflow's code separation partial class. /// [Serializable] public class WorkflowDataTrackingExtract : TrackingExtract { #region Private DataMembers private string _name = null; private TrackingAnnotationCollection _annotations = new TrackingAnnotationCollection(); #endregion #region Constructors ////// Default constructor. /// public WorkflowDataTrackingExtract() { } ////// Construct with a Member list. /// /// List of "." delineated property names public WorkflowDataTrackingExtract(string member) { _name = member; } #endregion #region TrackingExtract public override string Member { get { return _name; } set { _name = value; } } public override TrackingAnnotationCollection Annotations { get { return _annotations; } } internal override void GetData(Activity activity, IServiceProvider provider, IListitems) { Activity root = ContextActivityUtils.RootContextActivity(activity); if ((null == _name) || (0 == _name.Trim().Length)) { // // If we don't have a name we get everything PropertyHelper.GetAllMembers(root, items, _annotations); } else { TrackingDataItem item = null; PropertyHelper.GetProperty(_name, root, _annotations, out item); if (null != item) items.Add(item); } } #endregion } /// /// Used to extract data members from an activity in a workflow instance. /// [Serializable] public class ActivityDataTrackingExtract : TrackingExtract { #region Private DataMembers private string _name = null; private TrackingAnnotationCollection _annotations = new TrackingAnnotationCollection(); #endregion #region Constructors ////// Default constructor. /// public ActivityDataTrackingExtract() { } ////// Construct with a Member list. /// /// List of "." delineated property names public ActivityDataTrackingExtract(string member) { _name = member; } #endregion #region TrackingExtract public override string Member { get { return _name; } set { _name = value; } } public override TrackingAnnotationCollection Annotations { get { return _annotations; } } internal override void GetData(Activity activity, IServiceProvider provider, IListitems) { if ((null == _name) || (0 == _name.Trim().Length)) { // // If we don't have a name we get everything PropertyHelper.GetAllMembers(activity, items, _annotations); } else { TrackingDataItem item = null; PropertyHelper.GetProperty(_name, activity, _annotations, out item); if (null != item) items.Add(item); } } #endregion } } // File provided for Reference Use Only by Microsoft Corporation (c) 2007. // Copyright (c) Microsoft Corporation. All rights reserved.
Link Menu
![Network programming in C#, Network Programming in VB.NET, Network Programming in .NET](/images/book.jpg)
This book is available now!
Buy at Amazon US or
Buy at Amazon UK
- AffineTransform3D.cs
- _NTAuthentication.cs
- ImageIndexConverter.cs
- SerializationHelper.cs
- EarlyBoundInfo.cs
- RewritingPass.cs
- GlyphRunDrawing.cs
- DateBoldEvent.cs
- ConcurrentBag.cs
- RecipientIdentity.cs
- TextElementCollectionHelper.cs
- SqlFunctionAttribute.cs
- NativeMethods.cs
- ComplexLine.cs
- OverflowException.cs
- WmlObjectListAdapter.cs
- TableRowGroup.cs
- Transform3D.cs
- AmbientValueAttribute.cs
- DictionaryGlobals.cs
- Int64Converter.cs
- _ProxyRegBlob.cs
- SqlConnectionFactory.cs
- iisPickupDirectory.cs
- MatrixCamera.cs
- RecommendedAsConfigurableAttribute.cs
- DisplayNameAttribute.cs
- ContentFilePart.cs
- ApplicationId.cs
- Menu.cs
- SystemTcpConnection.cs
- WebPartMinimizeVerb.cs
- ListSortDescription.cs
- MobileComponentEditorPage.cs
- AmbientLight.cs
- ResXDataNode.cs
- PeerIPHelper.cs
- SingleTagSectionHandler.cs
- ArrangedElementCollection.cs
- Win32Interop.cs
- Effect.cs
- ColumnPropertiesGroup.cs
- InstanceLockQueryResult.cs
- Console.cs
- KnownTypesHelper.cs
- SafeRightsManagementPubHandle.cs
- SqlLiftWhereClauses.cs
- ExceptionUtil.cs
- Codec.cs
- EventPropertyMap.cs
- EntityDataSource.cs
- ProjectionPathBuilder.cs
- DataBindingList.cs
- VisualTreeHelper.cs
- GorillaCodec.cs
- HttpGetProtocolImporter.cs
- AsymmetricSecurityProtocol.cs
- TypedElement.cs
- OutputCacheSection.cs
- ProcessModelInfo.cs
- ToolStripControlHost.cs
- AnnotationResource.cs
- KeyConverter.cs
- MiniCustomAttributeInfo.cs
- DiscoveryInnerClientAdhocCD1.cs
- GridViewCancelEditEventArgs.cs
- TogglePattern.cs
- DataGridHeaderBorder.cs
- AutomationAttributeInfo.cs
- SmtpSection.cs
- Propagator.Evaluator.cs
- ControlBindingsCollection.cs
- WebPartConnectionsConnectVerb.cs
- ValidatingReaderNodeData.cs
- NonPrimarySelectionGlyph.cs
- CrossContextChannel.cs
- EmptyReadOnlyDictionaryInternal.cs
- System.Data_BID.cs
- TableCell.cs
- LinqDataSourceUpdateEventArgs.cs
- DynamicPhysicalDiscoSearcher.cs
- RuleSettings.cs
- DelimitedListTraceListener.cs
- ElementHostPropertyMap.cs
- BufferedGraphicsContext.cs
- SynchronizedDispatch.cs
- ExecutionEngineException.cs
- SystemUnicastIPAddressInformation.cs
- SecurityRuntime.cs
- RijndaelManagedTransform.cs
- CompModSwitches.cs
- StringWriter.cs
- ObjectSecurity.cs
- RuntimeHandles.cs
- TypeGenericEnumerableViewSchema.cs
- XmlSchemaAttributeGroupRef.cs
- ButtonRenderer.cs
- ToolStripCodeDomSerializer.cs
- SingleAnimationBase.cs
- SecurityKeyType.cs