示例#1
0
        /// <summary>
        /// Creates the tracked data.
        /// </summary>
        /// <param name="targetObject">The target object.</param>
        /// <param name="trackedObjectBag">The tracked object bag.</param>
        /// <returns>Object tracked data</returns>
        public static TrackedObjectData CreateTrackedData(object targetObject, TrackedObjectBag trackedObjectBag)
        {
            TrackedObjectData result = null;

            if (targetObject != null && !(targetObject is IntermediateObject) && targetObject is ISessionProvider)
            {
                result = new TrackedObjectData(targetObject, trackedObjectBag);
            }
            return(result);
        }
示例#2
0
        private TrackedObjectData getObjectData(object source)
        {
            TrackedObjectData trackedObjectData;

            if (!trackedObjects.TryGetValue(source, out trackedObjectData))
            {
                trackedObjectData = TrackedObjectData.CreateTrackedData(source, this);
                if (trackedObjectData != null)
                {
                    trackedObjects.Add(source, trackedObjectData);
                }
            }
            return(trackedObjectData);
        }
示例#3
0
 /// <summary>
 /// Creates the tracked data.
 /// </summary>
 /// <param name="targetObject">The target object.</param>
 /// <param name="trackedObjectBag">The tracked object bag.</param>
 /// <returns>Object tracked data</returns>
 public static TrackedObjectData CreateTrackedData(object targetObject, TrackedObjectBag trackedObjectBag)
 {
     TrackedObjectData result = null;
     if(targetObject != null && !(targetObject is IntermediateObject) && targetObject is ISessionProvider)
         result = new TrackedObjectData(targetObject, trackedObjectBag);
     return result;
 }