本文整理汇总了C#中IInvocation.PropertyName方法的典型用法代码示例。如果您正苦于以下问题:C# IInvocation.PropertyName方法的具体用法?C# IInvocation.PropertyName怎么用?C# IInvocation.PropertyName使用的例子?那么恭喜您, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在类IInvocation
的用法示例。
在下文中一共展示了IInvocation.PropertyName方法的4个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C#代码示例。
示例1: AddHandler
static void AddHandler(IInvocation invocation, PropertyChangedInterceptor propertyChangedInterceptor)
{
if (!handlers.ContainsKey(invocation.InvocationTarget))
handlers.Add(invocation.InvocationTarget, new Dictionary<string, PropertyChangedEventHandler>());
handlers[invocation.InvocationTarget].Add(invocation.PropertyName(), (o, e) =>
{
propertyChangedInterceptor.Notify(invocation);
propertyChangedInterceptor.SetDependents(invocation);
});
(invocation.GetArgumentValue(0) as INotifyPropertyChanged).PropertyChanged += handlers[invocation.InvocationTarget][invocation.PropertyName()];
}
示例2: SetDependents
public void SetDependents(IInvocation invocation)
{
var propertyName = invocation.PropertyName();
_dependencyMap
.Map
.Where(x => x.SourcePropName.StartsWith(propertyName))
.Each(propDependency =>
{
propDependency.WasChanged(invocation.InvocationTarget);
Notify(propDependency.TargetPropName, invocation.InvocationTarget);
});
}
示例3: Notify
public void Notify(IInvocation invocation)
{
Notify(invocation.PropertyName(), invocation.InvocationTarget);
}
示例4: RemoveHandler
static void RemoveHandler(IInvocation invocation)
{
(invocation.GetCurrentValue() as INotifyPropertyChanged).PropertyChanged -= handlers[invocation.InvocationTarget][invocation.PropertyName()];
handlers.Remove(invocation.InvocationTarget);
}