public void UpdateFromProvider(IDataSetProvider provider) { provider.SetToVariant(Parameter, _localValue); if (Property != null) { Owner.CallSetter(Property, _localValue); } }
public void Initialize <TOwner>(TOwner instance, IDataSetProvider provider, string propName) { if (Owner != null && Property != null) { return; } Owner = new PropertyOwner <TOwner>(instance); var parameter = Parameter.Get(provider); var knownType = KnownType.GetKnownType(typeof(TOwner)); if (knownType != null) { bool isParametrized = parameter != null && !Constant; var type = isParametrized ? parameter.GetHoldType().Type : _localValue.HoldType.Type; Property = knownType.GetProperty <TOwner>(type, propName); if (_localValue == null) { _localValue = new Variant(type); } if (Constant) { Owner.CallSetter(Property, isParametrized ? parameter.Value : _localValue); } } }
public void UpdateFromProvider(IDataSetProvider provider) { provider.SetToParameter(Parameter); if (Property != null) { Owner.CallSetter(Property, Parameter); } }
public void Initialize <TOwner>(TOwner instance, string propName) { if (Owner != null && Property != null) { return; } Owner = new PropertyOwner <TOwner>(instance); var knownType = KnownType.GetKnownType(typeof(TOwner)); if (knownType != null) { Property = knownType.GetProperty <TOwner>(Parameter.HoldType.Type, propName); if (Constant) { Owner.CallSetter(Property, Parameter); } } }