private string GetName()
        {
            string result = string.Empty;

            foreach (NameIt name in Enum.GetValues(typeof(NameIt)))
            {
                if (NameIt.HasFlag(name))
                {
                    result += GetProperty <string>(name.ToString());
                }
            }

            return(result);
        }
        public NamedFactAttribute(NameIt nameIt, SplitBy splitBy, JoinWith joinWith, [CallerMemberName] string methodName = null, [CallerFilePath] string absoluteFilePath = null)
        {
            NameIt   = nameIt;
            Splitter = splitBy;
            Joiner   = joinWith;

            AbsolutePath = absoluteFilePath;
            AbsolutePathWithoutExtension = GetCallerFilePathWithoutFileExtension();
            NameSpace = GetNameSpace();
            FileName  = Path.GetFileName(absoluteFilePath);
            FileNameWithoutExtension = Path.GetFileNameWithoutExtension(absoluteFilePath);
            MethodName = methodName;

            SetDisplayName();
        }
Пример #3
0
 public NamedTheoryAttribute(NameIt nameIt, SplitBy splitBy, JoinWith joinWith, [CallerMemberName] string callerName = null, [CallerFilePath] string sourceFilePath = null)
     : base(nameIt, splitBy, joinWith, callerName, sourceFilePath)
 {
 }