コード例 #1
0
ファイル: ActivityBuilder.cs プロジェクト: zheng1748/corewf
 private static PropertyReferenceCollection GetPropertyReferenceCollection(object target)
 {
     if (!AttachablePropertyServices.TryGetProperty(target, propertyReferencesPropertyID, out PropertyReferenceCollection propertyReferences))
     {
         propertyReferences = new PropertyReferenceCollection(target);
         AttachablePropertyServices.SetProperty(target, propertyReferencesPropertyID, propertyReferences);
     }
     return(propertyReferences);
 }
コード例 #2
0
ファイル: ActivityBuilder.cs プロジェクト: zheng1748/corewf
        public static bool ShouldSerializePropertyReferences(object target)
        {
            PropertyReferenceCollection propertyReferences = GetPropertyReferenceCollection(target);

            return(propertyReferences.Count > 1 || propertyReferences.SingleItem == null);
        }