예제 #1
0
        protected void SetupBase()
        {
            Support = new UmbracoSupport();
            Support.SetupUmbraco();

            ContentTypeServiceMock = Mock.Get(Support.ServiceContext.ContentTypeService);
            Config = new FluentContentTypeConfiguration(Support.ServiceContext);
        }
예제 #2
0
        public void SampleUsage()
        {
            var config = new FluentContentTypeConfiguration(Support.ServiceContext);

            config.DataType("richtext")
            .PropertyEditor("Umbraco.TinyMCEv3")
            .DataType(DataTypeDatabaseType.Ntext);

            config.DocumentType("contentType")
            .Tab("Content")
            .Property("text")
            .DisplayName("The text")
            .Description("#TextDescription")
            .DataType("richtext")
            .Property("Number")
            .DataType("number");

            var diffgram = config.Compare();

            if (diffgram.Safe)
            {
                config.Ensure(diffgram);
            }
        }