Example #1
0
        public WfClientResourceDescriptorConverterBase GetConverterByClientType(Type clientType)
        {
            WfClientResourceDescriptorConverterBase result = null;

            _ClientToServerMap.TryGetValue(clientType, out result);

            return(result);
        }
Example #2
0
        public WfClientResourceDescriptorConverterBase GetConverterByServerType(Type serverType)
        {
            WfClientResourceDescriptorConverterBase result = null;

            _ServerToClientMap.TryGetValue(serverType, out result);

            return(result);
        }
Example #3
0
        public void ServerToClient(WfResourceDescriptorCollection server, WfClientResourceDescriptorCollection client)
        {
            client.NullCheck("client");
            server.NullCheck("server");

            client.Clear();

            foreach (WfResourceDescriptor serverRes in server)
            {
                WfClientResourceDescriptorConverterBase converter = WfClientResourceDescriptorConverterFactory.Instance.GetConverterByServerType(serverRes.GetType());

                if (converter != null)
                {
                    WfClientResourceDescriptor clientRes = null;

                    converter.ServerToClient(serverRes, ref clientRes);

                    if (clientRes != null)
                    {
                        client.Add(clientRes);
                    }
                }
            }
        }
Example #4
0
 public static void RegisterServerToClient(Type serverType, WfClientResourceDescriptorConverterBase converter)
 {
     _ServerToClientMap[serverType] = converter;
 }
Example #5
0
 public static void RegisterClientToServer(Type clientType, WfClientResourceDescriptorConverterBase converter)
 {
     _ClientToServerMap[clientType] = converter;
 }
		public static void RegisterServerToClient(Type serverType, WfClientResourceDescriptorConverterBase converter)
		{
			_ServerToClientMap[serverType] = converter;
		}
		public static void RegisterClientToServer(Type clientType, WfClientResourceDescriptorConverterBase converter)
		{
			_ClientToServerMap[clientType] = converter;
		}