1234567891011121314151617181920212223242526272829303132333435363738394041 |
- using System;
- using System.Collections.Generic;
- using System.Linq.Expressions;
- using Luticate2.Auth.Utils.Business.Fields;
-
- namespace Luticate2.Auth.Utils.Dbo.Fields
- {
- public class LuFieldDbo
- {
- public IList<string> Parts { get; set; } = new List<string>();
-
- public static LuFieldDbo Make(IEnumerable<string> parts)
- {
- var partialFieldpath = new LuFieldDbo();
- return partialFieldpath.Add(parts);
- }
-
- public static LuFieldDbo Make(string path)
- {
- var partialFieldpath = new LuFieldDbo();
- return partialFieldpath.Add(path);
- }
-
- public static LuFieldDbo Make(LuFieldDbo path)
- {
- var partialFieldpath = new LuFieldDbo();
- return partialFieldpath.Add(path);
- }
-
- public static LuFieldDbo Make<TTypeTo>(Expression<Func<TTypeTo, object>> property)
- {
- var partialFieldpath = new LuFieldDbo();
- return partialFieldpath.Add(property);
- }
-
- public override string ToString()
- {
- return string.Join("/", Parts);
- }
- }
- }
|