mirror of
				https://github.com/jellyfin/jellyfin.git
				synced 2025-11-03 19:17:24 -05:00 
			
		
		
		
	
		
			
				
	
	
		
			28 lines
		
	
	
		
			692 B
		
	
	
	
		
			C#
		
	
	
	
	
	
			
		
		
	
	
			28 lines
		
	
	
		
			692 B
		
	
	
	
		
			C#
		
	
	
	
	
	
using System;
 | 
						|
using System.Collections.Generic;
 | 
						|
 | 
						|
namespace ServiceStack.Host
 | 
						|
{
 | 
						|
    public class ServiceMetadata
 | 
						|
    {
 | 
						|
        public ServiceMetadata()
 | 
						|
        {
 | 
						|
            this.OperationsMap = new Dictionary<Type, Type>();
 | 
						|
        }
 | 
						|
 | 
						|
        public Dictionary<Type, Type> OperationsMap { get; protected set; }
 | 
						|
 | 
						|
        public void Add(Type serviceType, Type requestType, Type responseType)
 | 
						|
        {
 | 
						|
            this.OperationsMap[requestType] = serviceType;
 | 
						|
        }
 | 
						|
 | 
						|
        public Type GetServiceTypeByRequest(Type requestType)
 | 
						|
        {
 | 
						|
            Type serviceType;
 | 
						|
            OperationsMap.TryGetValue(requestType, out serviceType);
 | 
						|
            return serviceType;
 | 
						|
        }
 | 
						|
    }
 | 
						|
}
 |