So yup ISimpleContentType needs the IUmbracoEntity, so we'll explicitly implement essentially hiding the implementation from the API unless it's explicitly cast

This commit is contained in:
Shannon
2019-02-07 13:29:01 +11:00
parent 3b12e0b72a
commit 03eaf3aa3d
2 changed files with 27 additions and 27 deletions

View File

@@ -5,10 +5,10 @@ namespace Umbraco.Core.Models
/// <summary>
/// Represents a simplified view of a content type.
/// </summary>
public interface ISimpleContentType
public interface ISimpleContentType : IUmbracoEntity
{
int Id { get; }
string Name { get; }
new int Id { get; }
new string Name { get; }
/// <summary>
/// Gets the alias of the content type.

View File

@@ -106,29 +106,29 @@ namespace Umbraco.Core.Models
// we have to have all this, because we're an IUmbracoEntity, because that is
// required by the query expression visitor / SimpleContentTypeMapper
//string ITreeEntity.Name { get => this.Name; set => throw new NotImplementedException(); }
//int IEntity.Id { get => this.Id; set => throw new NotImplementedException(); }
//bool IEntity.HasIdentity => this.Id != default;
//int ITreeEntity.CreatorId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//int ITreeEntity.ParentId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//int ITreeEntity.Level { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//string ITreeEntity.Path { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//int ITreeEntity.SortOrder { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//bool ITreeEntity.Trashed => throw new NotImplementedException();
//Guid IEntity.Key { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//DateTime IEntity.CreateDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//DateTime IEntity.UpdateDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//DateTime? IEntity.DeleteDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
//void ITreeEntity.SetParent(ITreeEntity parent) => throw new NotImplementedException();
//object IDeepCloneable.DeepClone() => throw new NotImplementedException();
//bool IRememberBeingDirty.WasDirty() => throw new NotImplementedException();
//bool IRememberBeingDirty.WasPropertyDirty(string propertyName) => throw new NotImplementedException();
//void IRememberBeingDirty.ResetWereDirtyProperties() => throw new NotImplementedException();
//void IRememberBeingDirty.ResetDirtyProperties(bool rememberDirty) => throw new NotImplementedException();
//IEnumerable<string> IRememberBeingDirty.GetWereDirtyProperties() => throw new NotImplementedException();
//bool ICanBeDirty.IsDirty() => throw new NotImplementedException();
//bool ICanBeDirty.IsPropertyDirty(string propName) => throw new NotImplementedException();
//IEnumerable<string> ICanBeDirty.GetDirtyProperties() => throw new NotImplementedException();
//void ICanBeDirty.ResetDirtyProperties() => throw new NotImplementedException();
string ITreeEntity.Name { get => this.Name; set => throw new NotImplementedException(); }
int IEntity.Id { get => this.Id; set => throw new NotImplementedException(); }
bool IEntity.HasIdentity => this.Id != default;
int ITreeEntity.CreatorId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
int ITreeEntity.ParentId { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
int ITreeEntity.Level { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
string ITreeEntity.Path { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
int ITreeEntity.SortOrder { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
bool ITreeEntity.Trashed => throw new NotImplementedException();
Guid IEntity.Key { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
DateTime IEntity.CreateDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
DateTime IEntity.UpdateDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
DateTime? IEntity.DeleteDate { get => throw new NotImplementedException(); set => throw new NotImplementedException(); }
void ITreeEntity.SetParent(ITreeEntity parent) => throw new NotImplementedException();
object IDeepCloneable.DeepClone() => throw new NotImplementedException();
bool IRememberBeingDirty.WasDirty() => throw new NotImplementedException();
bool IRememberBeingDirty.WasPropertyDirty(string propertyName) => throw new NotImplementedException();
void IRememberBeingDirty.ResetWereDirtyProperties() => throw new NotImplementedException();
void IRememberBeingDirty.ResetDirtyProperties(bool rememberDirty) => throw new NotImplementedException();
IEnumerable<string> IRememberBeingDirty.GetWereDirtyProperties() => throw new NotImplementedException();
bool ICanBeDirty.IsDirty() => throw new NotImplementedException();
bool ICanBeDirty.IsPropertyDirty(string propName) => throw new NotImplementedException();
IEnumerable<string> ICanBeDirty.GetDirtyProperties() => throw new NotImplementedException();
void ICanBeDirty.ResetDirtyProperties() => throw new NotImplementedException();
}
}