示例#1
0
        private void GetAndAddOperationDefinitionUriToCapabilityStatement(ListedCapabilityStatement capabilityStatement, string operationType)
        {
            Uri operationDefinitionUri = _urlResolver.ResolveOperationDefinitionUrl(operationType);

            capabilityStatement.Rest.Server().Operation.Add(new OperationComponent()
            {
                Name       = operationType,
                Definition = new ReferenceComponent
                {
                    Reference = operationDefinitionUri.ToString(),
                },
            });
        }
        public void Build(ICapabilityStatementBuilder builder)
        {
            EnsureArg.IsNotNull(builder, nameof(builder));

            builder.Apply(capabilityStatement =>
            {
                Uri operationDefinitionUri = _resolver.ResolveOperationDefinitionUrl(OperationsConstants.PurgeHistory);
                capabilityStatement.Rest.Server().Operation.Add(new OperationComponent()
                {
                    Name       = OperationsConstants.PurgeHistory,
                    Definition = new ReferenceComponent
                    {
                        Reference = operationDefinitionUri.ToString(),
                    },
                });
            });
        }
示例#3
0
 public void Build(ICapabilityStatementBuilder builder)
 {
     if (_schemaInformation.Current >= SchemaVersionConstants.PurgeHistoryVersion)
     {
         builder.Apply(capabilityStatement =>
         {
             Uri operationDefinitionUri = _resolver.ResolveOperationDefinitionUrl(OperationsConstants.PurgeHistory);
             capabilityStatement.Rest.Server().Operation.Add(new OperationComponent
             {
                 Name       = OperationsConstants.PurgeHistory,
                 Definition = new ReferenceComponent
                 {
                     Reference = operationDefinitionUri.ToString(),
                 },
             });
         });
     }
 }