המדריך לטרמפיסט בגלקסיה של הגיקים חלק חמישי

28 בApril 2014

הפעם במדריך על הוספת Code-Snippet דרך Visual Studio ועל איזור דמדומים שבין Internal Class ו Public Class הוספת "סניפטים" לתוך סביבת הפיתוח זה אחד הדברים המגניבים בהחלט ששווה לנסות. סניפטים למי שפספס זה כמו ללחוץ TAB TAB לאחר כתיבת המילה for או הכי מפורסם TAB TAB לאחר כתיבת cw בסביבת קונסול. אז למה שלא ננסה אחד משלנו? נניח ובתחילת כל מסמך קוד אתם רוצים להוסיף : "written by the one and the only XXX " ואז במקום לכתוב את הרצף הזה בכל פעם נרצה נניח להקיש wr ואז TAB TAB והצירוף הזה יופיע.. השלבים בהם ננקוט כדי להגשים את הפנטזיה. א. נפתח מסמך XML, ונדאג לשנות את...

C# Serialization Guide Part 6 – JSON

27 בApril 2014

Json is a nice transmission protocol based simple text which is popular especially on web .services , but C# could also serilize for Json format The main benefit of using C# to Json is the javaScript – Ajax built in supported to deserialized .those files :So , lets get back to our serialization contract public interface ISerializeService { bool write(object data, Type type, string path); object read(string path, Type t); } ,And we needs some data object to test pay attention to DataContract and DataMember attributes ...
תגובה אחת

C# Serialization Guide Part 5 – functions

23 בApril 2014

In general functions is out of the scope. There is no reason to serialize functions, and if you exist you can serialize text who describe the function logic, we need to remember that the all idea of .seilalization is to transfer data from endpoint to endpoint In WCF we did something close but yet, we are just exposing an public service signature and not the implementation, the reason of this discussion came out since we are try to keep a whole .object on a Text-file and maybe we like to deserialized it as is .For a start lets exam the result of our...
אין תגובות

C# Serialization Guide Part 4 – Binary serializer

18 בApril 2014

..Now, back to the basics, or may we say to the computing Origin ,Of course the base of all stream , networking , and of course a Serialization is Binary .And to Translate an object to the smallest units of bytes If we would try to compare Binary to XML it probably faster to process , so if we talking about .large amount of data just think about binary .The binary encoding is quite unreadable, but don’t trust it as encrypted .Note: The XML could be found very useful to transfer via Web-Services for other platforms :So again define the DTO , the Contract and the...
אין תגובות

C# Serialization Guide Part 3 – ISerializable Interface

14 בApril 2014

Another popular way to use serialization is by customize the serialization environment .But than the serialization results depends on your implementation .This is often more complicated but indeed more flexible :again lets used the base serialization Contract as we saw at former serialization posts public interface ISerializeService { bool write(object data, Type type); object read(string path,Type t); } :Now lets define the object we like to serialize public class SerializeTest : ISerializable { public string...
אין תגובות

C# Serialization Guide Part1 – xml serializer

11 בApril 2014

How to serialize an Object ? what is the options for serializations method? And what the benefits .using those ways Serialization is an Process that takes an Data and parse it into a kind of file, or physical unit at .the memory, or database The main two popular ways are binary serialization and xml serialization .For a small demo lets declare an Object we like to serialize public class MyData { public int PublicID { get; set; } private int PrivateID; ...
תגיות: , , ,
אין תגובות