流利的C#到目前为止还有多远?

Ben*_*Ben 3 c# coding-style fluent-interface

public static class Th
{
    public static T e<T>(T theObject) where T : class
    {
        return theObject;
    }        
}

public static class ObjectExtensions
{
    public static bool Is<T>(this T o, Func<T, bool> a) where T : class
    {
        return a(o);
    }
}

//...

//logic in a method somewhere
Func<string, bool> valid = property => _myService.SomeValidationMethod(property);

if (Th.e(_request.Property).Is(valid))
{
   //do something
}
Run Code Online (Sandbox Code Playgroud)

这段代码适合生产吗?为什么?

编辑:感谢您的所有意见.我希望你阅读我对C#语法的延伸,以及阅读你的回答时的突破点.

Jac*_*cob 5

我对流畅的API没有任何问题,但这似乎违反了最少惊喜的原则.我不明白命名的类的目的,也不理解命名Th的方法e.