/// <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); }
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); }
/// <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; }