Exemple #1
0
        static SeparatorInfo SeparatorInfoByBeginSeparator(string str)
        {
            if (str == null)
                return null;

            SeparatorInfo result = Separators.Where( (sepInfo) => str.StartsWith(sepInfo.BeginSeparator) ).FirstOrDefault();

            return result;
        }
Exemple #2
0
        public static string Wrap(this PropertyKind propertyKind,  string stringToWrap)
        {
            SeparatorInfo separatorInfo = propertyKind.SeparatorInfoByPropertyKind();

            if (separatorInfo == null)
                return stringToWrap;

            string result = separatorInfo.BeginSeparator + stringToWrap + separatorInfo.EndSepartor;

            return result;
        }
Exemple #3
0
        static SeparatorInfo SeparatorInfoByPropertyKind(this PropertyKind propertyKind)
        {
            SeparatorInfo result = Separators.Where((sepInfo) => sepInfo.ThePropertyKind == propertyKind).FirstOrDefault();

            return result;
        }