* Migrating more model, mapping and tree classes * Migrating files from Mapping dir without Newtonsoft dependency * Migrating files from PublishedContent and Editors dirs without Newtonsoft dependency + some more of the same kind * Migrating DataType class without the usage of Newtonsoft.Json and making the corresponding changes to all classes affected * Combining 3 ContentExtensions files into 1 * Refactoring from migrating ContentExtensions * Migrating more classes * Migrating ContentRepositoryExtensions - combining it with existing file in Umbraco.Core * removing Newtonsoft json dependency & migrating file. Adding partial migration of ConfigurationEditor, so PropertyTagsExtensions can be migrated * Migrating ContentTagsExtensions, and refactoring from changes in PropertyTagsExtensions * Changes that should be reverted once ConfigurationEditor class is fully migrated * VS couldn't find Composing, so build was failing. Removing the using solves the problem * Handling a single case for deserializing a subset of an input * Small changes and added tests to JsonNetSerializer Signed-off-by: Bjarke Berg <mail@bergmania.dk> * Migrated ConfigurationEditor Signed-off-by: Bjarke Berg <mail@bergmania.dk> Co-authored-by: Bjarke Berg <mail@bergmania.dk>
75 lines
3.5 KiB
C#
75 lines
3.5 KiB
C#
using System.Collections.Generic;
|
|
using Umbraco.Core.Models;
|
|
using Umbraco.Core.Strings;
|
|
|
|
namespace Umbraco.Core
|
|
{
|
|
public static class ConventionsHelper
|
|
{
|
|
public static Dictionary<string, PropertyType> GetStandardPropertyTypeStubs(IShortStringHelper shortStringHelper) =>
|
|
new Dictionary<string, PropertyType>
|
|
{
|
|
{
|
|
Constants.Conventions.Member.Comments,
|
|
new PropertyType(shortStringHelper, Constants.PropertyEditors.Aliases.TextArea, ValueStorageType.Ntext, true,
|
|
Constants.Conventions.Member.Comments)
|
|
{
|
|
Name = Constants.Conventions.Member.CommentsLabel
|
|
}
|
|
},
|
|
{
|
|
Constants.Conventions.Member.FailedPasswordAttempts,
|
|
new PropertyType(shortStringHelper, Constants.PropertyEditors.Aliases.Label, ValueStorageType.Integer, true,
|
|
Constants.Conventions.Member.FailedPasswordAttempts)
|
|
{
|
|
Name = Constants.Conventions.Member.FailedPasswordAttemptsLabel,
|
|
DataTypeId = Constants.DataTypes.LabelInt
|
|
}
|
|
},
|
|
{
|
|
Constants.Conventions.Member.IsApproved,
|
|
new PropertyType(shortStringHelper, Constants.PropertyEditors.Aliases.Boolean, ValueStorageType.Integer, true,
|
|
Constants.Conventions.Member.IsApproved)
|
|
{
|
|
Name = Constants.Conventions.Member.IsApprovedLabel
|
|
}
|
|
},
|
|
{
|
|
Constants.Conventions.Member.IsLockedOut,
|
|
new PropertyType(shortStringHelper, Constants.PropertyEditors.Aliases.Boolean, ValueStorageType.Integer, true,
|
|
Constants.Conventions.Member.IsLockedOut)
|
|
{
|
|
Name = Constants.Conventions.Member.IsLockedOutLabel
|
|
}
|
|
},
|
|
{
|
|
Constants.Conventions.Member.LastLockoutDate,
|
|
new PropertyType(shortStringHelper, Constants.PropertyEditors.Aliases.Label, ValueStorageType.Date, true,
|
|
Constants.Conventions.Member.LastLockoutDate)
|
|
{
|
|
Name = Constants.Conventions.Member.LastLockoutDateLabel,
|
|
DataTypeId = Constants.DataTypes.LabelDateTime
|
|
}
|
|
},
|
|
{
|
|
Constants.Conventions.Member.LastLoginDate,
|
|
new PropertyType(shortStringHelper, Constants.PropertyEditors.Aliases.Label, ValueStorageType.Date, true,
|
|
Constants.Conventions.Member.LastLoginDate)
|
|
{
|
|
Name = Constants.Conventions.Member.LastLoginDateLabel,
|
|
DataTypeId = Constants.DataTypes.LabelDateTime
|
|
}
|
|
},
|
|
{
|
|
Constants.Conventions.Member.LastPasswordChangeDate,
|
|
new PropertyType(shortStringHelper, Constants.PropertyEditors.Aliases.Label, ValueStorageType.Date, true,
|
|
Constants.Conventions.Member.LastPasswordChangeDate)
|
|
{
|
|
Name = Constants.Conventions.Member.LastPasswordChangeDateLabel,
|
|
DataTypeId = Constants.DataTypes.LabelDateTime
|
|
}
|
|
}
|
|
};
|
|
}
|
|
}
|