You can not select more than 25 topics
Topics must start with a letter or number, can include dashes ('-') and can be up to 35 characters long.
20 lines
418 B
20 lines
418 B
6 years ago
|
using System;
|
||
|
using System.Collections.Generic;
|
||
|
using System.Text;
|
||
|
using YamlDotNet.RepresentationModel;
|
||
|
|
||
|
namespace DockerFileBuildHelper
|
||
|
{
|
||
|
public static class Extensions
|
||
|
{
|
||
|
public static YamlNode TryGet(this YamlNode node, string key)
|
||
|
{
|
||
|
try
|
||
|
{
|
||
|
return node[key];
|
||
|
}
|
||
|
catch (KeyNotFoundException) { return null; }
|
||
|
}
|
||
|
}
|
||
|
}
|