本文整理匯總了C#中System.Workflow.ComponentModel.ActivityBind.GetRuntimeValue方法的典型用法代碼示例。如果您正苦於以下問題:C# ActivityBind.GetRuntimeValue方法的具體用法?C# ActivityBind.GetRuntimeValue怎麽用?C# ActivityBind.GetRuntimeValue使用的例子?那麽, 這裏精選的方法代碼示例或許可以為您提供幫助。您也可以進一步了解該方法所在類System.Workflow.ComponentModel.ActivityBind
的用法示例。
在下文中一共展示了ActivityBind.GetRuntimeValue方法的4個代碼示例,這些例子默認根據受歡迎程度排序。您可以為喜歡或者感覺有用的代碼點讚,您的評價將有助於係統推薦出更棒的C#代碼示例。
示例1: SetGetRuntimeValue
public void SetGetRuntimeValue ()
{
object obj;
string st = string.Empty;
ClassProvider cp = new ClassProvider ();
ActivityBind ab = new ActivityBind ("ClassProvider", "Name");
obj = ab.GetRuntimeValue (cp, st.GetType ());
Assert.AreEqual ("Hello", obj.ToString (), "C1#1");
ab.SetRuntimeValue (cp, "Bye");
obj = ab.GetRuntimeValue (cp, st.GetType ());
Assert.AreEqual ("Bye", obj.ToString (), "C1#2");
}
示例2: GetBoundValue
protected override object GetBoundValue(ActivityBind bind, Type targetType)
{
if (bind == null)
throw new ArgumentNullException("bind");
if (targetType == null)
throw new ArgumentNullException("targetType");
object returnVal = bind;
Activity activity = this.ParentDependencyObject as Activity;
if (activity != null)
returnVal = bind.GetRuntimeValue(activity, targetType);
return returnVal;
}
示例3: GetBoundValue
protected override object GetBoundValue(ActivityBind bind, Type targetType)
{
if (bind == null)
{
throw new ArgumentNullException("bind");
}
if (targetType == null)
{
throw new ArgumentNullException("targetType");
}
object runtimeValue = bind;
Activity parentDependencyObject = base.ParentDependencyObject as Activity;
if (parentDependencyObject != null)
{
runtimeValue = bind.GetRuntimeValue(parentDependencyObject, targetType);
}
return runtimeValue;
}
示例4: GetRuntimeValueNull
public void GetRuntimeValueNull ()
{
string st = string.Empty;
ActivityBind ab = new ActivityBind ("ClassProvider", "Name");
object obj = ab.GetRuntimeValue (null, st.GetType ());
}