private void serializeBurstBinary_Click(object sender, EventArgs e) { // create fake obj var obj = RootContainer.CreateFakeRoot(); // create instance of sharpSerializer var settings = new SharpSerializerBinarySettings(BinarySerializationMode.Burst); var serializer = new SharpSerializer(settings); // ************************************************************************************* // For advanced serialization you create SharpSerializer with an overloaded constructor // // SharpSerializerBinarySettings settings = createBinarySettings(); // serializer = new SharpSerializer(settings); // // Scroll the page to the createBinarySettings() method for more details // ************************************************************************************* // set the filename var filename = "sharpSerializerExample.burst"; // serialize serialize(obj, serializer, filename); }
public void serializeSizeOptimizedBinary_Click(object sender, EventArgs e) { // create fake obj var obj = RootContainer.CreateFakeRoot(); // create instance of sharpSerializer var serializer = new SharpSerializer(true); // ************************************************************************************* // For advanced serialization you create SharpSerializer with an overloaded constructor // // SharpSerializerBinarySettings settings = createBinarySettings(); // serializer = new SharpSerializer(settings); // // Scroll the page to the createBinarySettings() method for more details // ************************************************************************************* // set the filename var filename = "sharpSerializerExample.sizeOptimized"; // serialize SerializationMessage = serialize(obj, serializer, filename); //IKI: iOS UIAlertView ShowMessageAlert(this, null); return; }
public void serializeXmlButton_Click(object sender, EventArgs e) { // create fake obj var obj = RootContainer.CreateFakeRoot(); // create instance of sharpSerializer // with the standard constructor it serializes to xml var serializer = new SharpSerializer(); // ************************************************************************************* // For advanced serialization you create SharpSerializer with an overloaded constructor // // SharpSerializerXmlSettings settings = createXmlSettings(); // serializer = new SharpSerializer(settings); // // Scroll the page to the createXmlSettings() method for more details // ************************************************************************************* // ************************************************************************************* // You can alter the SharpSerializer with its settings, you can provide your custom readers // and writers as well, to serialize data into Json or other formats. // // var serializer = createSerializerWithCustomReaderAndWriter(); // // Scroll the page to the createSerializerWithCustomReaderAndWriter() method for more details // ************************************************************************************* // set the filename var filename = "sharpSerializerExample.xml"; // serialize SerializationMessage = serialize(obj, serializer, filename); //IKI: iOS UIAlertView ShowMessageAlert(this, null); return; }
public void AdvTest() { ObjectComparer(RootContainer.CreateFakeRoot()); }