mirror of
https://github.com/BepInEx/mono.git
synced 2026-11-16 17:10:20 -10:00
21 lines
548 B
C#
21 lines
548 B
C#
using System;
|
|
using System.Collections.Generic;
|
|
using System.Text;
|
|
using System.ComponentModel;
|
|
using System.Net;
|
|
|
|
namespace System.ServiceModel.Configuration
|
|
{
|
|
class IPAddressConverter
|
|
: TypeConverter
|
|
{
|
|
public override bool CanConvertFrom (ITypeDescriptorContext context, Type sourceType) {
|
|
return sourceType == typeof (string);
|
|
}
|
|
|
|
public override object ConvertFrom (ITypeDescriptorContext context, System.Globalization.CultureInfo culture, object value) {
|
|
return IPAddress.Parse ((string) value);
|
|
}
|
|
}
|
|
}
|