Ejemplo n.º 1
0
        void Init()
        {
            _metaDataCollection = new Dictionary <string, string>();

            ItemSpec = InternalSdkProjMD.ProjectFilePath;

            //TargetFx
            if (!string.IsNullOrWhiteSpace(InternalSdkProjMD.Fx.FxTargetMonikerString))
            {
                TargetFxMonikerString = InternalSdkProjMD.Fx.FxTargetMonikerString;
                this.SetMetadata(TARGET_FX, TargetFxMonikerString);
            }

            //Platform specific Fx
            if (!string.IsNullOrWhiteSpace(InternalSdkProjMD.Fx.EnvironmentSpecificTargetFxMonikerString))
            {
                PlatformSpecificTargetFxMonikerString = InternalSdkProjMD.Fx.EnvironmentSpecificTargetFxMonikerString;
                this.SetMetadata(PLATFORM_SPECIFIC_TARGET_FX, PlatformSpecificTargetFxMonikerString);
            }

            // Project Type
            this.SetMetadata(PROJECT_TYPE, InternalSdkProjMD.ProjectType.ToString());

            // Project Category
            this.SetMetadata(PROJECT_CATEGORY, InternalSdkProjMD.ProjectCategory.ToString());

            // Package Reference list
            PackageRefList = InternalSdkProjMD.SdkPkgRefList;

            if (PackageRefList.Any <string>())
            {
                string pkgStr = string.Join(";", PackageRefList);
                this.SetMetadata(PKG_REF_LIST, pkgStr);
            }
        }
Ejemplo n.º 2
0
        public void UpdateMetadata()
        {
            this.SetMetadata(TARGET_FX, TargetFxMonikerString);
            this.SetMetadata(PLATFORM_SPECIFIC_TARGET_FX, PlatformSpecificTargetFxMonikerString);
            this.SetMetadata(PROJECT_TYPE, SdkProjType.ToString());
            this.SetMetadata(PROJECT_CATEGORY, SdkProjCategory.ToString());
            this.SetMetadata(OUTPUT_PATH, OutputPath);

            if (PackageRefList.Any <string>())
            {
                string pkgStr = string.Join(";", PackageRefList);
                this.SetMetadata(PKG_REF_LIST, pkgStr);
            }
        }