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)); }
public void TestParseCompositeKeyInvalidAttribute() { var _ = CompositeKey.ParseCompositeKey("abc\u0000def\u0000ghi\u0000jk\udbff\udfffl\u0000mno\u0000"); }
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)); }