Example #1
0
        public void TestParseCompositeKey()
        {
            CompositeKey key = CompositeKey.ParseCompositeKey("\u0000abc\u0000def\u0000ghi\u0000jkl\u0000mno\u0000");

            Assert.AreEqual(key.ObjectType, "abc");
            Assert.AreEqual(key.Attributes.Count, 4);
            CollectionAssert.AreEquivalent(key.Attributes, new [] { "def", "ghi", "jkl", "mno" });
            Assert.AreEqual(key.ToString(), "\u0000abc\u0000def\u0000ghi\u0000jkl\u0000mno\u0000");
        }
        public IAsyncQueryResultsEnumerable <IKeyValue> GetPrivateDataByPartialCompositeKeyAsync(string collection, string compositeKey)
        {
            if (compositeKey == null)
            {
                compositeKey = "";
            }

            CompositeKey key = compositeKey.StartsWith(CompositeKey.NAMESPACE) ? CompositeKey.ParseCompositeKey(compositeKey) : new CompositeKey(compositeKey);

            return(GetPrivateDataByPartialCompositeKeyAsync(collection, key));
        }
Example #3
0
 public void TestParseCompositeKeyInvalidAttribute()
 {
     var _ = CompositeKey.ParseCompositeKey("abc\u0000def\u0000ghi\u0000jk\udbff\udfffl\u0000mno\u0000");
 }
Example #4
0
 public void TestParseCompositeKeyInvalidObjectType()
 {
     var _ = CompositeKey.ParseCompositeKey("ab\udbff\udfffc\u0000def\u0000ghi\u0000jkl\u0000mno\u0000");
 }
 public CompositeKey SplitCompositeKey(string compositeKey)
 {
     return(CompositeKey.ParseCompositeKey(compositeKey));
 }
        public IAsyncQueryResultsEnumerable <IKeyValue> GetStateByPartialCompositeKeyAsync(string compositeKey)
        {
            CompositeKey key = compositeKey.StartsWith(CompositeKey.NAMESPACE) ? CompositeKey.ParseCompositeKey(compositeKey) : new CompositeKey(compositeKey);

            return(GetStateByPartialCompositeKeyAsync(key));
        }