public string GetMetadata(string metadataName)
            {
                var wk = ProjectCollection.GetWellKnownMetadata(metadataName, ItemSpec, Path.GetFullPath, null);

                if (wk != null)
                {
                    return(wk);
                }
                var ret = (string)metadata [metadataName];

                return(ret ?? string.Empty);
            }
Exemple #2
0
        string ITaskItem.GetMetadata(string metadataName)
        {
            var wk = ProjectCollection.GetWellKnownMetadata(metadataName, evaluated_include_part, Path.GetFullPath, null);

            if (wk != null)
            {
                return(wk);
            }
            var mde = item.Metadata.FirstOrDefault(m => m.Name == metadataName);

            return(mde != null ? mde.Value : null);
        }
Exemple #3
0
        public string GetMetadataValue(string name)
        {
            if (name == null)
            {
                throw new ArgumentNullException("name");
            }
            var wk = ProjectCollection.GetWellKnownMetadata(name, EvaluatedInclude, project.GetFullPath, RecursiveDir);

            if (wk != null)
            {
                return(wk);
            }
            var m = GetMetadata(name);

            return(m != null ? m.EvaluatedValue : string.Empty);
        }