/// <summary> /// Gets a connectible property for the specified tag type with the specified name. Returns <c>null</c> if <paramref name="carrier"/> is not a valid carrier object. /// </summary> /// <typeparam name="TTag">The tag type of the property.</typeparam> /// <param name="carrier">The carrier object for this property.</param> /// <param name="name">The name of the property.</param> /// <param name="bypassValidation">An optional value indicating whether to bypass carrier object validation. The default is <c>false</c>.</param> public ConnectibleProperty <dynamic> TryGet <TTag>(object carrier, string name, bool bypassValidation = false) { Contract.Requires(carrier != null); Contract.Requires(name != null); if (!bypassValidation && !TryVerify(carrier)) { return(null); } var dictionary = _propertyStore.Get(carrier); return(new ConnectibleProperty <dynamic>(dictionary, TagName <TTag> .Name + name)); }
private void InterpretProperties(PropertyStore properties) { var allProperties = properties.ToKeyValuePairs(); foreach (var key in allProperties.Keys) { if (key.Contains(".$hidden")) { var hiddenValue = properties.Get(key); properties.Set(key.Replace(".$hidden", ""), Unhide(hiddenValue)); } } }