1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950 |
- using System;
- using System.Collections.Generic;
- using System.Linq;
- using System.Linq.Expressions;
- using Luticate2.Auth.Business.Fields;
-
- namespace Luticate2.Auth.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 LuFieldDbo Copy()
- {
- return new LuFieldDbo
- {
- Parts = Parts.ToList()
- };
- }
-
- public override string ToString()
- {
- return string.Join("/", Parts);
- }
- }
- }
|