コード例 #1
0
        public string ToJsonString()
        {
            var verStr = SpecContext.Specification switch
            {
                Specification.ClientServer =>
                SpecContext.ClientServer(SpecContext).RemovedVersion.ToJsonString(),
                Specification.ServerServer =>
                SpecContext.ServerServer(SpecContext).RemovedVersion.ToJsonString(),
                Specification.ApplicationService =>
                SpecContext.ApplicationService(SpecContext).RemovedVersion.ToJsonString(),
                Specification.IdentityService =>
                SpecContext.IdentityService(SpecContext).RemovedVersion.ToJsonString(),
                Specification.PushGateway =>
                SpecContext.PushGateway(SpecContext).RemovedVersion.ToJsonString(),
                Specification.Rooms =>
                SpecContext.Rooms(SpecContext).RemovedVersion.ToJsonString(),
                _ => throw new InvalidDataException(Resources.UnknownMatrixApiType)
            };

            var apiStr = SpecContext.Specification.ToJsonString();

            return($"{MatrixSpecUrl}/{apiStr}/{verStr}.html#${Path}");
        }
    }