ClrPlus.Scripting.MsBuild.Utility.MsBuildMap.IntMetadataRoute C# (CSharp) Метод

IntMetadataRoute() статический приватный Метод

static private IntMetadataRoute ( this metadataName, string defaultValue = null ) : ToRoute
metadataName this
defaultValue string
Результат ToRoute
        internal static ToRoute IntMetadataRoute(this string metadataName, string defaultValue = null)
        {
            return metadataName.MapTo<ProjectItemDefinitionElement>(pide => {
                foreach(var m in pide.Metadata) {
                    var metadata = m;
                    if(metadata.Name == metadataName) {
                        return new Accessor(() => metadata.Value.ToInt32(), (v) => metadata.Value = v.ToString().ToInt32().ToString());
                    }
                }
                var n = pide.AddMetadata(metadataName, defaultValue ?? "");
                return new Accessor(() => n.Value.ToInt32(), (v) => n.Value = v.ToString().ToInt32().ToString());
            });
        }