System.Net.NetworkInformation.OsxNetworkInterface.GetOrCreate C# (CSharp) 메소드

GetOrCreate() 개인적인 정적인 메소드

Gets or creates an OsxNetworkInterface, based on whether it already exists in the given Dictionary. If created, it is added to the Dictionary.
private static GetOrCreate ( OsxNetworkInterface>.Dictionary interfaces, string name ) : OsxNetworkInterface
interfaces OsxNetworkInterface>.Dictionary The Dictionary of existing interfaces.
name string The name of the interface.
리턴 OsxNetworkInterface
        private static OsxNetworkInterface GetOrCreate(Dictionary<string, OsxNetworkInterface> interfaces, string name)
        {
            OsxNetworkInterface oni;
            if (!interfaces.TryGetValue(name, out oni))
            {
                oni = new OsxNetworkInterface(name);
                interfaces.Add(name, oni);
            }

            return oni;
        }