/// <summary> /// Gets a file event trigger object /// </summary> /// <returns>FileEventTrigger</returns> public static FileEventTrigger GetFileTriggerObject() { string sourceShareId = "/subscriptions/db4e2fdb-6d80-4e6e-b7cd-736098270664/resourcegroups/demo-resources/providers/microsoft.databoxedge/databoxedgedevices/edge-demo-device/shares/localshare"; string roleId = "/subscriptions/db4e2fdb-6d80-4e6e-b7cd-736098270664/resourceGroups/demo-resources/providers/Microsoft.DataBoxEdge/DataBoxEdgeDevices/edge-demo-device/roles/IotRole"; FileEventTrigger fileEventTrigger = new FileEventTrigger(new FileSourceInfo(sourceShareId), new RoleSinkInfo(roleId), customContextTag: "fileEventTrigger"); return(fileEventTrigger); }
private PSStackEdgeTrigger CreateResourceModel() { Trigger trigger; var roleSinkInfo = new RoleSinkInfo(this.RoleId); if (this.FileEvent.IsPresent) { var fileSourceInfo = new FileSourceInfo(this.ShareId); trigger = new FileEventTrigger(fileSourceInfo, roleSinkInfo, name: this.Name); } else { var periodicSourceInfo = new PeriodicTimerSourceInfo(this.StartTime, this.Schedule, this.Topic); trigger = new PeriodicTimerEventTrigger(periodicSourceInfo, roleSinkInfo, name: this.Name); } return(PSStackEdgeTrigger.PSStackEdgeTriggerObject( this.StackEdgeManagementClient.Triggers.CreateOrUpdate( this.DeviceName, this.Name, trigger, this.ResourceGroupName))); }
/// <summary> /// Gets a file event trigger object /// </summary> /// <returns>FileEventTrigger</returns> public static FileEventTrigger GetFileTriggerObject(string localShareId, string roleId) { FileEventTrigger fileEventTrigger = new FileEventTrigger(new FileSourceInfo(localShareId), new RoleSinkInfo(roleId), customContextTag: "fileEventTrigger"); return(fileEventTrigger); }
public EventArgs(string fileName, string fullPath, FileEventTrigger fileEventTrigger) { this.FileName = fileName; this.FullPath = fullPath; this.FileEventTrigger = fileEventTrigger; }