Jump to content

  • Log In with Google      Sign In   
  • Create Account


ryanmvsg

Member Since 28 Mar 2012
Offline Last Active Jul 22 2012 09:45 AM
-----

Topics I've Started

Gaming Sync Cloud Service

21 May 2012 - 08:36 PM

I don't know if this is allowed but it seems like it would be (I apologize in advance if it is not feel free to delete/close it). My friend is releasing a gaming cloud service that syncs all game replays across all machines. It is targeted towards games that do not already have a cloud service. The open beta hits tonight you can send invite requests (just stating what games you would use it for, no personal information is needed) to cloud@drslabscorp.com. You will get a reply email giving your credentials for the beta as well as a download link for the client. Please note the beta is as-is and provides no warranty. There are limited slots open, so if you want one please send a request asap and please actually participate in the beta. You can view more info at http://www.drslabscorp.com/

[C#] KB815131 work around

29 March 2012 - 02:19 PM

Does anyone else have another work around other then renaming all of your class references in the reference.cs file? I have a serialized dicitonary with many different key/value pair types and that would be an unreasonable solution to have to go through it everytime I had to update the service reference :(

[C#] Web Svc Serialize Problem

28 March 2012 - 07:59 PM

Hey everyone, I'm new here so sorry if I mess things up (hello to all of you btw Posted Image ). I have a weird problem. I have been making this web service no problem for the past couple of days. I had to use a custom dictionary (code below) to serialize my dictionaries (holding serialized class objects). I made some minor function additions to the web service, went to recompile and BAM visual studio turned all of my SerializableDictionary classes (in function parameters, so for example public void AddMethod(SerialzableDictionary data) would read in the object browser public void AddMethod(DataSet data)) into DataSets Posted Image Also I can no longer access the SerializableDictionary class from the client (the object browser just does not show it). I can see the class inside of the web service namespace. I also can load the IL DASM and it shows the class in the web service dll just fine?! So I am confused...I have tried re-creating the web service, restarting my computer/visual studio, to no avail.
Here is the custom dictionary class used to serialize dictionary data across the web service.
[XmlRoot("dictionary")]
	public class SerializableDictionary<TKey, TValue> : Dictionary<TKey, TValue>, IXmlSerializable
	{
		#region IXmlSerializable Members
		public System.Xml.Schema.XmlSchema GetSchema()
		{
			return null;
		}
		public void ReadXml(System.Xml.XmlReader reader)
		{
			XmlSerializer keySerializer = new XmlSerializer(typeof(TKey));
			XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue));
			bool wasEmpty = reader.IsEmptyElement;
			reader.Read();
			if (wasEmpty)
				return;
			while (reader.NodeType != System.Xml.XmlNodeType.EndElement)
			{
				reader.ReadStartElement("item");
				reader.ReadStartElement("key");
				TKey key = (TKey)keySerializer.Deserialize(reader);
				reader.ReadEndElement();
				reader.ReadStartElement("value");
				TValue value = (TValue)valueSerializer.Deserialize(reader);
				reader.ReadEndElement();
				this.Add(key, value);
				reader.ReadEndElement();
				reader.MoveToContent();
			}
			reader.ReadEndElement();
		}
		public void WriteXml(System.Xml.XmlWriter writer)
		{
			XmlSerializer keySerializer = new XmlSerializer(typeof(TKey));
			XmlSerializer valueSerializer = new XmlSerializer(typeof(TValue));
			foreach (TKey key in this.Keys)
			{
				writer.WriteStartElement("item");
				writer.WriteStartElement("key");
				keySerializer.Serialize(writer, key);
				writer.WriteEndElement();
				writer.WriteStartElement("value");
				TValue value = this[key];
				valueSerializer.Serialize(writer, value);
				writer.WriteEndElement();
				writer.WriteEndElement();
			}
		}
		#endregion
	}
Here is the picture of the il dasm seeing the class (I have highlighted it).
http://tinypic.com/r/2a8qioh/5 <----------- couldn't embed I tried sorry
Any help is much appreciated! Thanks everyone! Posted Image

PARTNERS