TechSmith.Hyde.Table.TableItem.IsAnonymousType C# (CSharp) Method

IsAnonymousType() private static method

private static IsAnonymousType ( object entity ) : bool
entity object
return bool
        private static bool IsAnonymousType( object entity )
        {
            Type type = entity.GetType();
             var typeInfo = type.GetTypeInfo();

             return typeInfo.IsDefined( typeof( CompilerGeneratedAttribute ), false )
                 && type.Name.Contains( "AnonymousType" )
                 && ( type.Name.StartsWith( "<>" ) || type.Name.StartsWith( "VB$" ) )
                 && ( typeInfo.Attributes & TypeAttributes.NotPublic ) == TypeAttributes.NotPublic;
        }