//******************************************************************************************************
// FormatSpecificationBehavior.cs - Gbtc
//
// Copyright © 2012, Grid Protection Alliance. All Rights Reserved.
//
// Licensed to the Grid Protection Alliance (GPA) under one or more contributor license agreements. See
// the NOTICE file distributed with this work for additional information regarding copyright ownership.
// The GPA licenses this file to you under the MIT License (MIT), the "License"; you may
// not use this file except in compliance with the License. You may obtain a copy of the License at:
//
// http://www.opensource.org/licenses/MIT
//
// Unless agreed to in writing, the subject software distributed under the License is distributed on an
// "AS-IS" BASIS, WITHOUT WARRANTIES OR CONDITIONS OF ANY KIND, either express or implied. Refer to the
// License for the specific language governing permissions and limitations.
//
// Code Modification History:
// ----------------------------------------------------------------------------------------------------
// 01/30/2015 - A.S. Bikle
// Generated original version of source code.
//
//******************************************************************************************************
#if !MONO
using System.ServiceModel.Description;
namespace GSF.ServiceModel.Activation
{
///
/// WCF Endpoint behavior intended to be attached to REST endpoints.
/// Attaches to inspect requests and alter their formats as required.
///
public class FormatSpecificationBehavior : IEndpointBehavior
{
///
/// Implement to pass data at runtime to bindings to support custom behavior.
///
/// The endpoint to modify.The objects that binding elements require to support the behavior.
public void AddBindingParameters(ServiceEndpoint endpoint, System.ServiceModel.Channels.BindingParameterCollection bindingParameters)
{
}
///
/// Implements a modification or extension of the client across an endpoint.
///
/// The endpoint that is to be customized.The client runtime to be customized.
public void ApplyClientBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.ClientRuntime clientRuntime)
{
}
///
/// Implements a modification or extension of the service across an endpoint.
///
/// The endpoint that exposes the contract.The endpoint dispatcher to be modified or extended.
public void ApplyDispatchBehavior(ServiceEndpoint endpoint, System.ServiceModel.Dispatcher.EndpointDispatcher endpointDispatcher)
{
endpointDispatcher.DispatchRuntime.MessageInspectors.Add(new FormatSpecificationInspector());
}
///
/// Implement to confirm that the endpoint meets some intended criteria.
///
/// The endpoint to validate.
public void Validate(ServiceEndpoint endpoint)
{
}
}
}
#endif