Ejemplo n.º 1
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ObjectSavingArgs"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="target">The target.</param>
 /// <param name="savingContext">The saving context.</param>
 /// <param name="service">The service.</param>
 public ObjectSavingArgs(
     Context context,
     object target,
     AbstractTypeSavingContext savingContext,
     IAbstractService service)
     : base(context)
 {
     Target        = target;
     SavingContext = savingContext;
     Service       = service;
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Initializes a new instance of the <see cref="ObjectSavingArgs"/> class.
 /// </summary>
 /// <param name="context">The context.</param>
 /// <param name="target">The target.</param>
 /// <param name="savingContext">The saving context.</param>
 /// <param name="service">The service.</param>
 public ObjectSavingArgs(
     Context context, 
     object target, 
     AbstractTypeSavingContext savingContext,
     IAbstractService service)
     : base(context)
 {
     Target = target;
     SavingContext = savingContext;
     Service = service;
 }
Ejemplo n.º 3
0
 AbstractDataMappingContext IAbstractService.CreateDataMappingContext(AbstractTypeSavingContext creationContext)
 {
     return(((IAbstractService)Service).CreateDataMappingContext(creationContext));
 }
Ejemplo n.º 4
0
 public void SaveObject(AbstractTypeSavingContext abstractTypeSavingContext)
 {
     Service.SaveObject(abstractTypeSavingContext);
 }
Ejemplo n.º 5
0
 AbstractDataMappingContext ISitecoreService.CreateDataMappingContext(AbstractTypeSavingContext creationContext)
 {
     return(Service.CreateDataMappingContext(creationContext));
 }
 public override AbstractDataMappingContext CreateDataMappingContext(AbstractTypeSavingContext creationContext)
 {
     throw new NotImplementedException();
 }
 public override AbstractDataMappingContext CreateDataMappingContext(AbstractTypeSavingContext creationContext)
 {
     throw new NotImplementedException();
 }
Ejemplo n.º 8
0
        /// <summary>
        /// Used to create the context used by DataMappers to map data from a class
        /// </summary>
        /// <param name="creationContext"></param>
        /// <returns></returns>
        public override AbstractDataMappingContext CreateDataMappingContext(AbstractTypeSavingContext creationContext)
        {
            var umbContext = creationContext as UmbracoTypeSavingContext;

            return(new UmbracoDataMappingContext(umbContext.Object, umbContext.Content, this));
        }
Ejemplo n.º 9
0
 /// <summary>
 /// Saves the object.
 /// </summary>
 /// <param name="abstractTypeSavingContext">The abstract type saving context.</param>
 public override void SaveObject(AbstractTypeSavingContext abstractTypeSavingContext)
 {
     ContentService.Save(((UmbracoTypeSavingContext)abstractTypeSavingContext).Content);
     base.SaveObject(abstractTypeSavingContext);
 }