public void Run(ITaskOutput output, NameValueCollection metaData) { AttributesContainer attributeses = new AttributesContainer(metaData["Attributes"]); object serializedSources = attributeses.GetAttribute("nonexistingsources"); AntidotePackageDefinition antidotePackageDefinition = JsonConvert.DeserializeObject<AntidotePackageDefinition>(serializedSources as string); RemoveSources(antidotePackageDefinition); }
public void Process(AntidotePackagePipelineArgs args) { AntidotePackageDefinition packageDefinition = new AntidotePackageDefinition { FilesInfo = args.AntidotePackageDefinition.GetFileSources(SourceStatus.New), ItemsId = args.AntidotePackageDefinition.GetItemSources(SourceStatus.New) }; string serializedSources = JsonConvert.SerializeObject(packageDefinition); AttributesContainer attributeses = new AttributesContainer(); attributeses.AddAttribute("nonexistingsources", serializedSources); args.AntidotePackageProject.Metadata.Attributes = attributeses.ConvertoToPackageAttributes(); }