Example #1
0
        protected override void Execute(NativeActivityContext context)
        {
            var pModel = new PackageModel();

            pModel.Id          = PackageId.Get(context);
            pModel.Description = Description.Get(context);
            pModel.Version     = Models.PackageModel.CreateFullVersionFromMajorMinor(MajorVersion.Get(context), MinorVersion.Get(context));
            pModel.Authors     = Authors.Get(context);
            pModel.Owners      = Owners.Get(context);
            pModel.LicenseUrl  = LicenseUrl.Get(context);
            pModel.ProjectUrl  = ProjectUrl.Get(context);
            pModel.IconUrl     = IconUrl.Get(context);
            pModel.RequireLicenseAcceptance = RequireLicenseAcceptance.Get(context);
            pModel.ReleaseNotes             = ReleaseNotes.Get(context);
            pModel.Copyright              = Copyright.Get(context);
            pModel.Tags                   = Tags.Get(context);
            pModel.DirectorySet           = DirectorySet.Get(context);
            pModel.ModelsAssemblyGuid     = ModelsAssemblyGuid.Get(context) ?? Guid.NewGuid().ToString();
            pModel.ActivitiesAssemblyGuid = ActivitiesAssemblyGuid.Get(context) ?? Guid.NewGuid().ToString();

            this.PackageModel.Set(context, pModel);

            context.Properties.Add("PackageModel", pModel);

            context.ScheduleActivity(this.Body);
        }
        protected override PackageModel Execute(CodeActivityContext context)
        {
            var pModel = new PackageModel();

            pModel.Id          = PackageId.Get(context);
            pModel.Description = Description.Get(context);
            pModel.Version     = Version.Get(context);
            pModel.Authors     = Authors.Get(context);
            pModel.Owners      = Owners.Get(context);
            pModel.LicenseUrl  = LicenseUrl.Get(context);
            pModel.ProjectUrl  = ProjectUrl.Get(context);
            pModel.IconUrl     = IconUrl.Get(context);
            pModel.RequireLicenseAcceptance = RequireLicenseAcceptance.Get(context);
            pModel.ReleaseNotes             = ReleaseNotes.Get(context);
            pModel.Copyright              = Copyright.Get(context);
            pModel.Tags                   = Tags.Get(context);
            pModel.DirectorySet           = DirectorySet.Get(context);
            pModel.ModelsAssemblyGuid     = ModelsAssemblyGuid.Get(context);
            pModel.ActivitiesAssemblyGuid = ActivitiesAssemblyGuid.Get(context);

            return(pModel);
        }