Esempio n. 1
0
        public bool Equals(AssetNamesKey other)
        {
            if (ReferenceEquals(null, other)) return false;
            if (ReferenceEquals(this, other)) return true;

            return other._names.IsEqualTo(_names);
        }
Esempio n. 2
0
        public void hash_code_is_predictable()
        {
            var key1 = new AssetNamesKey(new string[] { "a", "b", "c" });
            var key2 = new AssetNamesKey(new string[] { "a", "b", "c" });

            key1.GetHashCode().ShouldEqual(key2.GetHashCode());
            key1.GetHashCode().ShouldEqual(key2.GetHashCode());
            key1.GetHashCode().ShouldEqual(key2.GetHashCode());
            key1.GetHashCode().ShouldEqual(key2.GetHashCode());
            key1.GetHashCode().ShouldEqual(key2.GetHashCode());
        }
Esempio n. 3
0
        public void equals_is_not_order_dependent()
        {
            var key1 = new AssetNamesKey(new string[] { "a", "b", "c" });
            var key2 = new AssetNamesKey(new string[] { "b", "c", "a" });
            var key3 = new AssetNamesKey(new string[] { "d", "b", "c" });

            key1.ShouldEqual(key2);
            key2.ShouldEqual(key1);

            key3.ShouldNotEqual(key1);
            key1.ShouldNotEqual(key3);
        }
Esempio n. 4
0
        public void equals()
        {
            var key1 = new AssetNamesKey(new string[]{"a", "b", "c"});
            var key2 = new AssetNamesKey(new string[]{"a", "b", "c"});
            var key3 = new AssetNamesKey(new string[]{"d", "b", "c"});

            key1.ShouldEqual(key2);
            key2.ShouldEqual(key1);

            key3.ShouldNotEqual(key1);
            key1.ShouldNotEqual(key3);
        }
Esempio n. 5
0
        public bool Equals(AssetNamesKey other)
        {
            if (ReferenceEquals(null, other))
            {
                return(false);
            }
            if (ReferenceEquals(this, other))
            {
                return(true);
            }

            return(other._names.IsEqualTo(_names));
        }
 public virtual IEnumerable <string> FindDependencies(AssetNamesKey key)
 {
     return(_graph.GetAssets(key.Names).Select(x => x.Name));
 }
 public virtual IEnumerable<string> FindDependencies(AssetNamesKey key)
 {
     return _graph.GetAssets(key.Names).Select(x => x.Name);
 }