public ParentScope() { Body = new ActivityAction <MongoProperty> { Argument = new DelegateInArgument <MongoProperty>(ParentContainerPropertyTag), Handler = new Sequence { DisplayName = "Do" } }; }
public MyActivityWithAction() { Notify = new ActivityAction <String> { Argument = new DelegateInArgument <String> { Name = "message" } }; }
public Activity(string source, object item, Guid? createdBy, DateTime? when, ActivityAction? action) { if (source == null) throw new ArgumentNullException("source"); Source = source; Item = item; CreatedBy = createdBy; When = when; Action = action; }
/// <summary> /// Return recent blog activities /// </summary> /// <param name="range"></param> /// <param name="relativeTo"></param> /// <param name="actions"></param> /// <returns></returns> public IEnumerable<Activity> GetActivities(DateTimeRange range, object relativeTo, ActivityAction? actions) { var activities = new List<Activity>(); //Get blog posts in range activities.AddRange(_engine.GetPosts(range.From, range.To).Select(x => new Activity(BlogsSource, new BlogPostWrapperSummary(x), x.Author.ID, x.Updated, (range.In(x.Updated) ? ActivityAction.Updated : ActivityAction.Undefined) | (range.In(x.Datetime) ? ActivityAction.Created : ActivityAction.Undefined)) { ItemType = "post" })); //Get post comments in range activities.AddRange(_engine.GetComments(range.From, range.To, SecurityContext.CurrentAccount.ID).Select(x => new Activity(BlogsSource, new BlogPostCommentWrapper(x), x.UserID, x.Datetime, ActivityAction.Commented | (x.Inactive ? ActivityAction.Undefined : ActivityAction.Deleted) | (x.ParentId==Guid.Empty ? ActivityAction.Undefined : ActivityAction.Reply)) { ItemType = "comment", IsNew = !x.IsReaded, RelativeTo = x.PostId})); return activities; }
public void addActivity(Activity a, string Name) { var aa = new ActivityAction <UIElement>(); var da = new DelegateInArgument <UIElement>(); da.Name = Name; aa.Handler = a; ((GetElement)Activity).Body = aa; aa.Argument = da; }
private bool CanDo(object entityId, ActivityAction action) { var verificationId = Convert.ToInt32(entityId); var verification = (Activity)this.repository.Find(verificationId); return(this.activityPermissionManager.CanDo( action, this.userContext, verification)); }
/// <summary> /// </summary> /// <param name="range"></param> /// <param name="relativeTo"></param> /// <param name="actions"></param> /// <returns></returns> public IEnumerable<Activity> GetActivities(DateTimeRange range, object relativeTo, ActivityAction? actions) { var files = FileStorage.GetFileUpdates(range.From, range.To); var folders = FileStorage.GetFolderUpdates(range.From, range.To); var activities = new List<Activity>(files.Select(x => GetFileActivity(x, range))); activities.AddRange(folders.Select(x => GetFileActivity(x, range))); return activities; }
public ServiceNowScope() { Body = new ActivityAction <ServiceNowProp> { Argument = new DelegateInArgument <ServiceNowProp>("snowDetails"), Handler = new Sequence { DisplayName = "Execute SNOW activities" } }; }
//This is a constructor class for the custom activity. It will be executed everytime custom activity is loaded. public Recording_Scope() { Console.WriteLine("Recording Started..."); Body = new ActivityAction <string> { Argument = new DelegateInArgument <string>("FilePath"), Handler = new Sequence { DisplayName = "Do" } }; }
private static void checkOnCreateBase(bool onCreate, ActivityAction activityAction) { if (onCreate) { activityAction.ActionType = DAL.enums.ActionTypeEnum.Added; } else { activityAction.ActionType = DAL.enums.ActionTypeEnum.Edited; } }
public TestcaseScope() { this.Constraints.Add(ActivityConstraints.HasParentType <Activity, TestcaseReportScope>(Resources.ParentScope_ValidationMessage + " " + Resources.TestcaseReportScope)); Body = new ActivityAction <Testcase> { Argument = new DelegateInArgument <Testcase>(TestcaseContainerPropertyTag), Handler = new Sequence { DisplayName = "Do" } }; }
protected TriggerScope() : base() { Body = new ActivityAction <T> { Argument = new DelegateInArgument <T>(typeof(T).Name), Handler = new Sequence { DisplayName = "Do" } }; this.Debug = false; }
public WithDropboxSession() { Body = new ActivityAction <IDropboxSession>() { Argument = new DelegateInArgument <IDropboxSession>(DropboxSessionPropertyName), Handler = new Sequence() { DisplayName = Resources.DefaultBodyName } }; }
public JavaScope() { Body = new ActivityAction <object> { Argument = new DelegateInArgument <object>(JavaInvokerProperty), Handler = new Sequence() { DisplayName = Resources.Do } }; }
public Retry() { _internalDelay = new Delay { Duration = new InArgument <TimeSpan>(_delayDuration) }; Body = new ActivityAction(); MaxAttempts = 5; ExceptionType = typeof(TimeoutException); RetryInterval = _defaultRetryInterval; }
public GoogleSheetApplicationScope() { AuthenticationType = 0; Body = new ActivityAction <GoogleSheetProperty> { Argument = new DelegateInArgument <GoogleSheetProperty>(GoogleSheetPropertyTag), Handler = new Sequence { DisplayName = "Do" } }; }
/// <summary> /// Initialize /// </summary> public RepetitionByCounter() { Loop = new ActivityAction <int>() { Argument = new DelegateInArgument <Int32>("counter") , Handler = new System.Activities.Statements.Sequence() { DisplayName = "Do" } }; }
public IEnumerable<Activity> GetActivities(DateTimeRange range, object relativeTo, ActivityAction? actions) { return CoreContext.UserManager.GetUsers().Where(x => x.WorkFromDate.HasValue && range.In(x.WorkFromDate.Value)). Select(x => new Activity(NewEmployes, null, x.WorkFromDate) { RelativeTo = x.ID, Action = ActivityAction.Created } ); }
public WordCreate() { Body = new ActivityAction <object> { Argument = new DelegateInArgument <object>(GetWordAppTag), Handler = new Sequence() { DisplayName = "Do" } }; }
public WhileLoop() { Condition = null; Body = new ActivityAction { DisplayName = "Body", Handler = new Sequence { DisplayName = "Do" } }; }
public Activity Create(System.Windows.DependencyObject target) { var fef = new DatabaseScope(); var aa = new ActivityAction <Connection>(); var da = new DelegateInArgument <Connection>(); da.Name = "conn"; fef.Body = aa; aa.Argument = da; return(fef); }
public System.Activities.Activity Create(System.Windows.DependencyObject target) { var fef = new ForEachDataRow(); var aa = new ActivityAction <System.Data.DataRowView>(); var da = new DelegateInArgument <System.Data.DataRowView>(); da.Name = "row"; fef.Body = aa; aa.Argument = da; return(fef); }
public SSHConnectScope(IObjectContainer objectContainer) { _objectContainer = objectContainer; Body = new ActivityAction <IObjectContainer> { Argument = new DelegateInArgument <IObjectContainer> (ParentContainerPropertyTag), Handler = new Sequence { DisplayName = Resources.Do } }; }
public override IList <string> Convert(object value) { ActivityAction <T> action = value as ActivityAction <T>; IList <string> results = new List <string>(); if (action != null) { results.Add(action.Argument.Name); } return(results); }
public Activity Create(System.Windows.DependencyObject target) { var fef = new TakeScreenshot(); var aa = new ActivityAction <ImageElement>(); var da = new DelegateInArgument <ImageElement>(); da.Name = "item"; fef.Body = aa; aa.Argument = da; return(fef); }
public ADApplicationScope() { AuthenticationType = 0; Body = new ActivityAction <ADProperty> { Argument = new DelegateInArgument <ADProperty>("LDAPString"), Handler = new Sequence { DisplayName = "Do" } }; }
public OpenBrowser() { Body = new ActivityAction <object> { Argument = new DelegateInArgument <object>(OpenBrowsersPropertyTag), Handler = new Sequence() { DisplayName = "Do" } }; }
protected override void InitializeBody() { Body = new ActivityAction <IWorkbookAdapter> { Argument = new DelegateInArgument <IWorkbookAdapter>(WorkbookInstanceProperty), Handler = new Sequence() { DisplayName = "Do" } }; }
public ServerScopeActivity() { Body = new ActivityAction <ContextServer> { Argument = new DelegateInArgument <ContextServer>("ContextServer"), Handler = new Sequence { DisplayName = Resources.InteractWithContext } }; this.Debug = false; }
public Activity Create(System.Windows.DependencyObject target) { var fef = new GetMails(); var aa = new ActivityAction <email>(); var da = new DelegateInArgument <email>(); da.Name = "item"; fef.Body = aa; aa.Argument = da; return(fef); }
public EleScope() { Body = new ActivityAction <object> { Argument = new DelegateInArgument <object>(GetEleScope), Handler = new Sequence() { DisplayName = "Do" } }; }
public WithFtpSession() { FtpsMode = FtpsMode.None; Body = new ActivityAction <IFtpSession>() { Argument = new DelegateInArgument <IFtpSession>(FtpSessionPropertyName), Handler = new Sequence() { DisplayName = "Do" } }; }
public IEnumerable<Activity> GetActivities(DateTimeRange range, object relativeTo, ActivityAction? actions) { //Return birthdays return CoreContext.UserManager.GetUsers().Where(x => x.BirthDate.HasValue && range.In(x.BirthDate.Value)). Select(x => new Activity(Birthday, null, x.BirthDate) { RelativeTo = x.ID, Action = ActivityAction.Periodic } ); }
public SynapScope(IObjectContainer objectContainer) { this.synap = new SynapContext(); _objectContainer = objectContainer; Body = new ActivityAction <IObjectContainer> { Argument = new DelegateInArgument <IObjectContainer> (ParentContainerPropertyTag), Handler = new Sequence { DisplayName = Resources.Do } }; }
public void AddActivity(Activity a, string Name) { var aa = new ActivityAction <JavaElement>(); var da = new DelegateInArgument <JavaElement> { Name = Name }; aa.Handler = a; ((GetElement)Activity).Body = aa; aa.Argument = da; }
public IEnumerable<Activity> GetActivities(DateTimeRange range, object relativeTo, ActivityAction? actions) { var milestones = EngineFactory.GetMilestoneEngine().GetUpdates(range.From, range.To); var projects = EngineFactory.GetProjectEngine().GetUpdates(range.From, range.To); var tasks = EngineFactory.GetTaskEngine().GetUpdates(range.From, range.To); var comments = EngineFactory.GetCommentEngine().GetUpdates(range.From, range.To); var messages = EngineFactory.GetMessageEngine().GetUpdates(range.From, range.To); var participants = EngineFactory.GetProjectEngine().GetTeamUpdates(range.From, range.To); var timeTracking = EngineFactory.GetTimeTrackingEngine().GetUpdates(range.From, range.To); var subtasks = EngineFactory.GetTaskEngine().GetSubtaskUpdates(range.From, range.To); var activities = new List<Activity>(milestones .Select(x => new Activity(Projects, new MilestoneWrapper(x), (range.In(x.CreateOn) ? x.CreateBy : x.LastModifiedBy), (range.In(x.CreateOn) ? x.CreateOn : x.LastModifiedOn), (range.In(x.CreateOn) ? ActivityAction.Created : ActivityAction.Undefined) | (range.In(x.LastModifiedOn) ? ActivityAction.Updated : ActivityAction.Undefined) | (range.In(x.StatusChangedOn) && x.Status == MilestoneStatus.Closed ? ActivityAction.Closed : ActivityAction.Opened)) { ItemType = "milestone"})); activities.AddRange(projects .Select(x => new Activity(Projects, new ProjectWrapper(x), (range.In(x.CreateOn) ? x.CreateBy : x.LastModifiedBy), (range.In(x.CreateOn) ? x.CreateOn : x.LastModifiedOn), (range.In(x.CreateOn) ? ActivityAction.Created : ActivityAction.Undefined) | (range.In(x.LastModifiedOn) ? ActivityAction.Updated : ActivityAction.Undefined) | (range.In(x.StatusChangedOn) && x.Status == ProjectStatus.Closed ? ActivityAction.Closed : ActivityAction.Opened)) { ItemType = "project" })); activities.AddRange(tasks .Select(x => new Activity(Projects, new TaskWrapper(x), (range.In(x.CreateOn) ? x.CreateBy : x.LastModifiedBy), (range.In(x.CreateOn) ? x.CreateOn : x.LastModifiedOn), (range.In(x.CreateOn) ? ActivityAction.Created : ActivityAction.Undefined) | (range.In(x.LastModifiedOn) ? ActivityAction.Updated : ActivityAction.Undefined) | (range.In(x.StatusChangedOn) && x.Status == TaskStatus.Closed ? ActivityAction.Closed : ActivityAction.Opened)) { ItemType = "task"})); activities.AddRange(messages .Select(x=>new Activity(Projects, new MessageWrapper(x), range.In(x.CreateOn) ? x.CreateBy : x.LastModifiedBy, range.In(x.CreateOn) ? x.CreateOn : x.LastModifiedOn, (range.In(x.CreateOn) ? ActivityAction.Created : ActivityAction.Undefined) | (range.In(x.LastModifiedOn) ? ActivityAction.Updated : ActivityAction.Undefined)) { ItemType = "message"})); activities.AddRange(comments .Select(x=>new Activity(Projects,new { Comment = new CommentWrapper(x.Comment), CommentedType = x.CommentedType, CommentedTitle = x.CommentedTitle, CommentedId = x.CommentedId }, x.Comment.CreateBy, x.Comment.CreateOn, (range.In(x.Comment.CreateOn) ? ActivityAction.Created : ActivityAction.Undefined) | (x.Comment.Inactive ? ActivityAction.Deleted : ActivityAction.Undefined) | (x.Comment.Parent == Guid.Empty ? ActivityAction.Commented : ActivityAction.Reply)) { ItemType = "comment"})); activities.AddRange(participants .Select(x => new Activity(Projects, new ParticipantFullWrapper(x), x.ID, range.In(x.Created) ? x.Created : x.Updated, (range.In(x.Created) ? ActivityAction.Created : ActivityAction.Undefined) | (range.In(x.Updated) ? ActivityAction.Updated : ActivityAction.Undefined) | (x.Removed ? ActivityAction.Deleted : ActivityAction.Undefined)) { ItemType = "participant" })); activities.AddRange(timeTracking .Select(x => new Activity(Projects, new TimeWrapper(x), x.Person, x.Date, ActivityAction.Updated) {ItemType = "time"})); foreach (var task in subtasks) { var group = task.SubTasks; task.SubTasks = null; activities.AddRange(group .Select(x => new Activity(Projects, new {Task = new TaskWrapper(task), Subtask = new SubtaskWrapper(x, task)}, range.In(x.CreateOn) ? x.CreateBy : x.LastModifiedBy, range.In(x.CreateOn) ? x.CreateOn : x.LastModifiedOn, (range.In(x.CreateOn) ? ActivityAction.Created : ActivityAction.Undefined) | (range.In(x.LastModifiedOn) ? ActivityAction.Updated : ActivityAction.Undefined) | (range.In(x.StatusChangedOn) && x.Status == TaskStatus.Open ? ActivityAction.Opened : ActivityAction.Closed)) {ItemType = "subtask"})); } return activities; }
public IEnumerable<Activity> GetActivities(DateTimeRange range, object relativeTo, ActivityAction? actions) { var events = FeedStorage.GetFeedByDate(range.From, range.To, SecurityContext.CurrentAccount.ID); var comments = FeedStorage.GetCommentsByDate(range.From, range.To); var activities = new List<Activity>((events .Select(x => new Activity(Events, new EventWrapper(x), new Guid(x.Creator), x.Date, (range.In(x.Date) ? ActivityAction.Created : ActivityAction.Undefined)) {ItemType = "event"}))); activities.AddRange(comments .Select(x => new Activity(Events, new EventCommentWrapper(x), new Guid(x.Creator), x.Date, (range.In(x.Date) ? ActivityAction.Created : ActivityAction.Undefined) | (x.ParentId == 0 ? ActivityAction.Commented : ActivityAction.Reply) | (x.Inactive ? ActivityAction.Deleted : ActivityAction.Undefined)) {ItemType = "comment"})); return activities; }
public IEnumerable<Activity> GetActivities(DateTimeRange range, object relativeTo, ActivityAction? actions) { var comments = ImageStorage.GetComments(range.From, range.To); var albums = ImageStorage.GetPhotos(range.From, range.To) .GroupBy(x => x.UserID) .ToDictionary(x => x.Key, y => y.GroupBy(z => z.Album)); var activities = new List<Activity>(comments .Select(x => new Activity(Images, new { Comment = new PhotoAlbumItemCommentWrapper(x.Comment), Image = new PhotoAlbumItemWrapper(x.Image) }, new Guid(x.Comment.UserID), x.Comment.Timestamp, (range.In(x.Comment.Timestamp) ? ActivityAction.Created : ActivityAction.Undefined) | (x.Comment.ParentId == 0 ? ActivityAction.Commented : ActivityAction.Reply)) {ItemType = "comment"})); foreach (var album in albums) { activities.AddRange(album.Value .Select(x => new Activity(Images, new { Album = new PhotoAlbumWrapper(x.Key), Uploaded = x.Select(y => new PhotoAlbumItemWrapper(y)) }, new Guid(album.Key), null, (range.In(x.Key.LastUpdate) ? ActivityAction.Created : ActivityAction.Undefined)) {ItemType = "album"})); } return activities; }