public ContentPartFieldDefinition(ContentFieldDefinition contentFieldDefinition, string name, JObject settings)
 {
     Name = name;
     DisplayName = Name.CamelFriendly();
     FieldDefinition = contentFieldDefinition;
     Settings = settings;
 }
Exemple #2
0
 public ContentPartFieldDefinition(string name)
 {
     Name            = name;
     DisplayName     = Name.CamelFriendly();
     FieldDefinition = new ContentFieldDefinition(null);
     Settings        = new JObject();
 }
Exemple #3
0
 public ContentPartFieldDefinition(ContentFieldDefinition contentFieldDefinition, string name, JObject settings)
 {
     Name            = name;
     DisplayName     = Name.CamelFriendly();
     FieldDefinition = contentFieldDefinition;
     Settings        = settings;
 }
 public ContentPartFieldDefinition(string name)
 {
     Name = name;
     DisplayName = Name.CamelFriendly();
     FieldDefinition = new ContentFieldDefinition(null);
     Settings = new JObject();
 }
 public FieldConfigurerImpl(ContentPartFieldDefinition field)
     : base(field) {
     _fieldDefinition = field.FieldDefinition;
     _fieldName = field.Name;
 }
 public override ContentPartFieldDefinitionBuilder OfType(string fieldType) {
     _fieldDefinition = new ContentFieldDefinition(fieldType);
     return this;
 }
 public ContentPartFieldDefinition(ContentFieldDefinition contentFieldDefinition, string name, SettingsDictionary settings)
 {
     Name = name;
     FieldDefinition = contentFieldDefinition;
     Settings = settings;
 }
 public ContentPartFieldDefinition(string name)
 {
     Name = name;
     FieldDefinition = new ContentFieldDefinition(null);
     Settings = new SettingsDictionary();
 }
 private ContentFieldDefinitionRecord Acquire(ContentFieldDefinition contentFieldDefinition)
 {
     var result = GetContentDefinitionRecord().ContentFieldDefinitionRecords.SingleOrDefault(x => x.Name == contentFieldDefinition.Name);
     if (result == null)
     {
         result = new ContentFieldDefinitionRecord { Name = contentFieldDefinition.Name };
         GetContentDefinitionRecord().ContentFieldDefinitionRecords.Add(result);
     }
     return result;
 }
        private ContentFieldDefinitionRecord Acquire(ContentFieldDefinition contentFieldDefinition)
        {
            var result = _contentStorageManager
                .Query<ContentFieldDefinitionRecord>(x => x.Name == contentFieldDefinition.Name)
                .SingleOrDefault();

            if (result == null) {
                result = new ContentFieldDefinitionRecord { Name = contentFieldDefinition.Name };
                _contentStorageManager.Store(result);
            }
            return result;
        }
Exemple #11
0
 public EditFieldViewModel(ContentFieldDefinition contentFieldDefinition) {
     Name = contentFieldDefinition.Name;
     _Definition = contentFieldDefinition;
 }
 public ContentPartFieldDefinition(string name)
 {
     Name            = name;
     FieldDefinition = new ContentFieldDefinition(null);
     Settings        = new SettingsDictionary();
 }
 public ContentPartFieldDefinition(ContentFieldDefinition contentFieldDefinition, string name, SettingsDictionary settings)
 {
     Name            = name;
     FieldDefinition = contentFieldDefinition;
     Settings        = settings;
 }
 private ContentFieldDefinitionRecord Acquire(ContentFieldDefinition contentFieldDefinition)
 {
     return new ContentFieldDefinitionRecord { Name = contentFieldDefinition.Name };
 }
 public ContentFieldDefinitionModel(ContentFieldDefinition contentFieldDefinition) {
     Name = contentFieldDefinition.Name;
     DisplayName = contentFieldDefinition.Name;
     Settings = new Dictionary<string, string>();
 }
 public override ContentPartFieldDefinitionBuilder OfType(ContentFieldDefinition fieldDefinition) {
     _fieldDefinition = fieldDefinition;
     return this;
 }
 public abstract ContentPartFieldDefinitionBuilder OfType(ContentFieldDefinition fieldDefinition);
 private ContentFieldDefinitionRecord Acquire(ContentFieldDefinition contentFieldDefinition) {
     var result = _fieldDefinitionRepository.Table.SingleOrDefault(x => x.Name == contentFieldDefinition.Name);
     if (result == null) {
         result = new ContentFieldDefinitionRecord { Name = contentFieldDefinition.Name };
         _fieldDefinitionRepository.Create(result);
     }
     return result;
 }