Exemple #1
0
    public NamespaceHelp(string @namespace, CultureInfo culture, NamespaceHelpEntity?entity, Type[] types)
    {
        Culture   = culture;
        Namespace = @namespace;

        Types = types;

        var clean = @namespace.Replace(".Entities", "");

        Title = entity?.Let(a => a.Title.DefaultToNull()) ?? clean.TryAfterLast('.') ?? clean;

        Before = clean.TryBeforeLast('.');

        Description = entity?.Description;
        DBEntity    = entity;
    }
Exemple #2
0
        public NamespaceHelp(string @namespace, CultureInfo culture, NamespaceHelpEntity entity, Type[] types)
        {
            Culture   = culture;
            Namespace = @namespace;

            Types = types;

            var clean = @namespace.Replace(".Entities", "");

            Title = entity?.Let(a => a.Title.DefaultText(null)) ?? clean.TryAfterLast('.') ?? clean;

            Before = clean.TryBeforeLast('.');

            Description = entity?.Description;
            Entity      = entity ?? new NamespaceHelpEntity
            {
                Culture = this.Culture.ToCultureInfoEntity(),
                Name    = this.Namespace
            };
        }