Datasheet
Chapter 1: Workfl ow Programming Principles
30
Listing 1 - 11: The CustomCondition activity condition
using System;
using System.Workflow.ComponentModel;
using Microsoft.SharePoint.WorkflowActions;
using Microsoft.SharePoint;
namespace Chapter1
{
public class CustomCondition: ActivityCondition
{
public static readonly DependencyProperty ListNameProperty =
DependencyProperty.Register(“ListName”, typeof(string),
typeof(CustomCondition));
public string ListName
{
get { return (string)base.GetValue(ListNameProperty); }
set { base.SetValue(ListNameProperty, value); }
}
public static readonly DependencyProperty ItemIdProperty =
DependencyProperty.Register(“ItemId”, typeof(int),
typeof(CustomCondition));
public int ItemId
{
get { return (int)base.GetValue(ItemIdProperty); }
set { base.SetValue(ItemIdProperty, value); }
}
public static readonly DependencyProperty FieldNameProperty =
DependencyProperty.Register(“FieldName”, typeof(string),
typeof(CustomCondition));
public string FieldName
{
get { return (string)base.GetValue(FieldNameProperty); }
set { base.SetValue(FieldNameProperty, value); }
}
public static readonly DependencyProperty KeywordsProperty =
DependencyProperty.Register(“Keywords”, typeof(string),
typeof(CustomCondition));
public string Keywords
{
get { return (string)base.GetValue(KeywordsProperty); }
set { base.SetValue(KeywordsProperty, value); }
}
public static readonly DependencyProperty SiteUrlProperty =
DependencyProperty.Register(“SiteUrl”, typeof(string),
typeof(CustomCondition));
public string SiteUrl
{
get { return (string)base.GetValue(SiteUrlProperty); }
c01.indd 30c01.indd 30 8/25/08 4:03:00 PM8/25/08 4:03:00 PM