示例#1
0
        /// <exception cref = "FormatException"> One of union cases contains '/'. </exception>
        public static Route GetNestedCaseRoute(this IUnionCaseInfo unionCaseInfo)
        {
            var caseNames       = new List <String>();
            var currentCaseInfo = unionCaseInfo;

            while (true)
            {
                caseNames.Add(currentCaseInfo.name);

                if (currentCaseInfo.maybeDeclaringCaseInfo is {} parentCaseInfo)
                {
                    currentCaseInfo = parentCaseInfo;
                }
 /// <inheritdoc />
 public HasDuplicateName(IUnionCaseInfo caseInfo, IUnionCaseInfo sameNameCaseInfo) : base(caseInfo) =>
     this.sameNameCaseInfo = sameNameCaseInfo;
 public UnionCaseWriteMiddleware(IUnionCaseInfo unionCaseInfo, String caseRouteStr)
 {
     this.unionCaseInfo = unionCaseInfo;
     this.caseRouteStr  = caseRouteStr;
 }
 UnionCaseError(IUnionCaseInfo caseInfo) => this.caseInfo = caseInfo;