private static Dictionary<UFile, ObjectId> TryGet(Asset asset, ShadowObjectPropertyKey key)
 {
     var shadow = ShadowObject.GetOrCreate(asset);
     object obj;
     if (shadow.TryGetValue(key, out obj))
     {
         return (Dictionary<UFile, ObjectId>)obj;
     }
     return null;
 }
Beispiel #2
0
 private static Dictionary<UFile, ObjectId> TryGet(Asset asset, ShadowObjectPropertyKey key)
 {
     var shadow = ShadowObject.GetOrCreate(asset);
     object obj;
     if (shadow.TryGetValue(key, out obj))
     {
         return (Dictionary<UFile, ObjectId>)obj;
     }
     return null;
 }
 private static Dictionary<UFile, ObjectId> GetOrCreate(Asset asset, ShadowObjectPropertyKey key)
 {
     var shadow = ShadowObject.GetOrCreate(asset);
     object obj;
     if (shadow.TryGetValue(key, out obj))
     {
         return (Dictionary<UFile, ObjectId>)obj;
     }
     var hashes = new Dictionary<UFile, ObjectId>();
     shadow[key] = hashes;
     return hashes;
 }
Beispiel #4
0
 private static Dictionary<UFile, ObjectId> GetOrCreate(Asset asset, ShadowObjectPropertyKey key)
 {
     var shadow = ShadowObject.GetOrCreate(asset);
     object obj;
     if (shadow.TryGetValue(key, out obj))
     {
         return (Dictionary<UFile, ObjectId>)obj;
     }
     var hashes = new Dictionary<UFile, ObjectId>();
     shadow[key] = hashes;
     return hashes;
 }
Beispiel #5
0
        private static void ConvertUPaths(Asset asset, ShadowObjectPropertyKey from, ShadowObjectPropertyKey to, Func<UFile, UFile> converter)
        {
            var fromHashes = TryGet(asset, from);
            if (fromHashes != null)
            {
                var toHashes = GetOrCreate(asset, to);
                toHashes.Clear();

                foreach (var fromHAsh in fromHashes)
                {
                    var path = converter(fromHAsh.Key);
                    toHashes[path] = fromHAsh.Value;
                }
            }
        }
Beispiel #6
0
        private static void SetDictionary(Asset asset, ShadowObjectPropertyKey key, Dictionary <UFile, ObjectId> dictionary)
        {
            var shadow = ShadowObject.GetOrCreate(asset);

            shadow[key] = dictionary;
        }
        private static void ConvertUPaths(Asset asset, ShadowObjectPropertyKey from, ShadowObjectPropertyKey to, Func<UFile, UFile> converter)
        {
            var fromHashes = TryGet(asset, from);
            if (fromHashes != null)
            {
                var toHashes = GetOrCreate(asset, to);
                toHashes.Clear();

                foreach (var fromHAsh in fromHashes)
                {
                    var path = converter(fromHAsh.Key);
                    toHashes[path] = fromHAsh.Value;
                }
            }
        }
 private static void SetDictionary(Asset asset, ShadowObjectPropertyKey key, Dictionary<UFile, ObjectId> dictionary)
 {
     var shadow = ShadowObject.GetOrCreate(asset);
     shadow[key] = dictionary;
 }