网站综合信息 moddev.net
    • 标题:
    • .NET Addict 
    • 关键字:
    •  
    • 描述:
    •  
    • 域名信息
    • 域名年龄:24年3个月9天  注册日期:2001年09月20日  到期时间:2017年09月20日
      注册商:GODADDY.COM, LLC 
    • 服务器空间
    • IP:50.63.202.18 同IP网站209个 详情
      地址:美国 亚利桑那州斯科茨代尔市Go Daddy集团公司
    • 备案信息
    • 备案号: 
    网站收录SEO数据
    • 搜索引擎
    • 收录量
    • 反向链接
    • 其他
    • 百度
    • 0  
    • 0  
    • 快照:无首页快照  
    • Google
    • 1  
    • 0  
    • pr:1  
    • 雅虎
    • 0  
    •  
    •  
    • 搜搜
    • 0  
    •  
    •  
    • 搜狗
    • 0  
    •  
    • 评级:1/10  
    • 360搜索
    • 0  
    •  
    •  
    域名流量Alexa排名
    •  
    • 一周平均
    • 一个月平均
    • 三个月平均
    • Alexa全球排名
    • -  
    • 平均日IP
    • 日总PV
    • 人均PV(PV/IP比例)
    • 反向链接
    • dmoz目录收录
    • -  
    • 流量走势图
    域名注册Whois信息

    moddev.net

    域名年龄: 24年3个月9天
    注册时间: 2001-09-20
    到期时间: 2017-09-20
    注 册 商: GODADDY.COM, LLC

    获取时间: 2016年12月16日 13:17:18
    Domain Name: MODDEV.NET
    Registrar: GODADDY.COM, LLC
    Sponsoring Registrar IANA ID: 146
    Whois Server: whois.godaddy.com
    Referral URL: http://www.godaddy.com
    Name Server: NS13.DOMAINCONTROL.COM
    Name Server: NS14.DOMAINCONTROL.COM
    Status: clientDeleteProhibited https://icann.org/epp#clientDeleteProhibited
    Status: clientRenewProhibited https://icann.org/epp#clientRenewProhibited
    Status: clientTransferProhibited https://icann.org/epp#clientTransferProhibited
    Status: clientUpdateProhibited https://icann.org/epp#clientUpdateProhibited
    Updated Date: 2016-03-31
    Creation Date: 2001-09-20
    Expiration Date: 2017-09-20

    >>> Last update of whois database: Fri, 2016-Dec-16 05:23:31 GMT <<<

    For more information on Whois status codes, please visit https://icann.org/epp

    Domain Name: MODDEV.NET
    Registrar URL: http://www.godaddy.com
    Registrant Name: Nathan Taylor
    Registrant Organization:
    Name Server: NS13.DOMAINCONTROL.COM
    Name Server: NS14.DOMAINCONTROL.COM
    DNSSEC: unsigned

    For complete domain details go to:
    http://who.godaddy.com/whoischeck.aspx?domain=MODDEV.NET
    其他后缀域名
    • 顶级域名
    • 相关信息
    网站首页快照(纯文字版)
    抓取时间:2015年01月09日 18:17:25
    网址:http://moddev.net/
    标题:.NET Addict
    关键字:
    描述:
    主体:
    .NET Addict
    A glimpse into the daily affairs of an ASP.NET MVC developer by Nathan Taylor.
    Monday, May 7, 2012
    C# Truncate String - Whole Words
    This is an update to my original string truncate helper which can be set to respect whitespace when terminating a string. This version will start at the character index specified as max length and then iterate back to the first instance of whitespace (if it exists), thus keeping whole words intact.public static string Truncate(this string str, int maxLength, bool onlyOnWhiteSpace = false, bool appendEllipses = false) {
    if (str == null || maxLength >= str.Length)
    {
    return str;
    }
    
    if (onlyOnWhiteSpace
    && !char.IsWhiteSpace(str[maxLength])
    && str.Substring(0, maxLength).Any(char.IsWhiteSpace))
    {
    for (; maxLength >= 0; maxLength--)
    {
    if (char.IsWhiteSpace(str[maxLength]))
    {
    break;
    }
    }
    }
    
    return str.Substring(0, maxLength) + (appendEllipses ? "..." : "");
    }
    Posted by
    Nathan Taylor
    at
    1:59 PM
    0
    comments
    Share
    |
    Labels:
    c#,
    string,
    string manipulation,
    substring,
    truncate
    Tuesday, November 22, 2011
    ASP.NET MVC Comma Separated Values Model Binder
    In some scenarios such as data filtering it becomes necessary to pass multiple values to a single collection-typed request parameter. In typical flows this is achieved by passing multiple pairs of key and value parameters to the request.
    /path/to/foo?key=value1&key=value2&key=value3 
    While this works well, sometimes it is desirable to have something that is more human-readable. In an effort to satisfy that requirement, I have built a custom model binder to handle passing multiple values to a single parameter in the form of a single comma separated value.
    /path/to/foo?key=value1,value2,value3 
    This CommaSeparatedValuesModelBinder supports both generic collections and standard array types so long as the underlying type of the collection inherits from IConvertible (int, string, etc). In addition to supporting a comma separated value assignment, the implementation also maintains support for the default format of multiple key and value pairs. 
    Here's the code:
    public class CommaSeparatedValuesModelBinder : DefaultModelBinder
    {
    private static readonly MethodInfo ToArrayMethod = typeof(Enumerable).GetMethod("ToArray");
    
    protected override object GetPropertyValue(ControllerContext controllerContext, ModelBindingContext bindingContext, 
    PropertyDescriptor propertyDescriptor, IModelBinder propertyBinder)
    {
    if (propertyDescriptor.PropertyType.GetInterface(typeof (IEnumerable).Name) != null)
    {
    var actualValue = bindingContext.ValueProvider.GetValue(propertyDescriptor.Name);
    
    if (actualValue != null && !String.IsNullOrWhiteSpace(actualValue.AttemptedValue) &&
    actualValue.AttemptedValue.Contains(","))
    {
    var valueType = propertyDescriptor.PropertyType.GetElementType() ??
    propertyDescriptor.PropertyType.GetGenericArguments().FirstOrDefault();
    
    if (valueType != null && valueType.GetInterface(typeof (IConvertible).N

    © 2010 - 2020 网站综合信息查询 同IP网站查询 相关类似网站查询 网站备案查询网站地图 最新查询 最近更新 优秀网站 热门网站 全部网站 同IP查询 备案查询

    2025-12-22 07:58, Process in 0.0097 second.