예제 #1
0
 protected BuildShapeContext(IShape shape, string groupId, IShapeFactory shapeFactory, IZoneHolding layout, IUpdateModel updater)
 {
     Shape           = shape;
     ShapeFactory    = shapeFactory;
     GroupId         = groupId;
     HtmlFieldPrefix = string.Empty;
     Layout          = layout;
     FindPlacement   = FindDefaultPlacement;
     Updater         = updater;
 }
 public UpdatePartFieldEditorContext(
     ContentPartFieldDefinitionBuilder builder,
     IShape model,
     string groupId,
     bool isNew,
     IShapeFactory shapeFactory,
     IZoneHolding layout,
     IUpdateModel updater)
     : base(builder, model, groupId, isNew, shapeFactory, layout, updater)
 {
 }
 public UpdateContentDefinitionEditorContext(
     TBuilder builder,
     IShape model,
     string groupId,
     bool isNew,
     IShapeFactory shapeFactory,
     IZoneHolding layout,
     IUpdateModel updater)
     : base(model, groupId, isNew, "", shapeFactory, layout, updater)
 {
     Builder = builder;
 }
예제 #4
0
        public async Task <IZoneHolding> GetLayoutAsync()
        {
            if (_layout == null)
            {
                // Create a shape whose properties are dynamically created as Zone shapes
                _layout = await _shapeFactory.CreateAsync("Layout", () => new ValueTask <IShape>(new ZoneHolding(() => _shapeFactory.CreateAsync("Zone")))) as IZoneHolding;
            }

            if (_layout == null)
            {
                // At this point a Layout shape should always exist
                throw new ApplicationException("Fatal error, a Layout couldn't be created.");
            }

            return(_layout);
        }
예제 #5
0
 public UpdateEditorContext(IShape model, string groupId, bool isNew, string htmlFieldPrefix, IShapeFactory shapeFactory,
                            IZoneHolding layout, IUpdateModel updater)
     : base(model, groupId, isNew, htmlFieldPrefix, shapeFactory, layout, updater)
 {
 }
예제 #6
0
 public BuildEditorContext(IShape shape, string groupId, bool isNew, string htmlFieldPrefix, IShapeFactory shapeFactory, IZoneHolding layout, IUpdateModel updater)
     : base(shape, groupId, shapeFactory, layout, updater)
 {
     HtmlFieldPrefix = htmlFieldPrefix;
     IsNew           = isNew;
 }
예제 #7
0
 public BuildDisplayContext(IShape shape, string displayType, string groupId, IShapeFactory shapeFactory, IZoneHolding layout, IUpdateModel updater)
     : base(shape, groupId, shapeFactory, layout, updater)
 {
     DisplayType = displayType;
 }