Mombu the Programming Forum

Go Back   Mombu the Programming Forum > Programming > How do you exclude a property from serialization using CodeDomSerializer
User Name
Password
REGISTER NOW! Mark Forums Read




Reply Bookmark and Share
1 13th October 10:15
mick doherty
External User
 
Posts: 1
Default How do you exclude a property from serialization using CodeDomSerializer



Have you tried adding ShouldSerializePropertyName methods?

private bool controlsNormalized = false;
public bool ControlsNormalized
{
get { return controlsNormalized; }
set { controlsNormalized = value; }
}
private bool ShouldSerializeControlsNormalized()
{ return false; }

private Control baseControl = null;
public Control BaseControl
{
get { return baseControl; }
set { baseControl = value; }
}
private bool ShouldSerializeBaseControl()
{ return false; }

--
Mick Doherty
http://dotnetrix.co.uk/nothing.html
  Reply With Quote


 


2 16th October 19:52
schneider
External User
 
Posts: 1
Default How do you exclude a property from serialization using CodeDomSerializer



Also the attribute:

[DesignerSerializationVisibility( DesignerSerializationVisibility.Hidden)]

"Mick Doherty"
  Reply With Quote
3 16th October 19:52
tribbles
External User
 
Posts: 1
Default How do you exclude a property from serialization using CodeDomSerializer


Wow! I spent a day going over various documentation and did not see
anything about either method mentioned. I tried the method and it
solved the problem nicely. Thanks!
  Reply With Quote
4 16th October 19:52
schneider
External User
 
Posts: 1
Default How do you exclude a property from serialization using CodeDomSerializer


Yep, A lot of these little things come with experience building controls.

You might want to review the Attribute derived objects, there are a lot of
designer related items.

Schneider
  Reply With Quote
5 16th October 19:52
jokiz
External User
 
Posts: 1
Default How do you exclude a property from serialization using CodeDomSerializer


or just read the designer related sample chapter of chris sell's book,
a lot stuff is in there
  Reply With Quote
6 16th October 19:52
tribbles
External User
 
Posts: 1
Default How do you exclude a property from serialization using CodeDomSerializer


<snip>

Are you referring to this book: Windows Forms 2.0 Programming (2nd
Edition) ?

Always willing to buy a book that has good info in it. Unfortunately
I have 4 books on windows forms that have nothing about designers in
them. So any books with designer is of interest to me!
  Reply With Quote
7 16th October 19:52
jokiz
External User
 
Posts: 1
Default How do you exclude a property from serialization using CodeDomSerializer


yes, it has one chapter for design time integration. i've also read a
book from bluevision but it's just a good reference but hard to
understand.
  Reply With Quote
Reply


Thread Tools
Display Modes


Some other forums that might be of your interest : Development, Ada, Apple script, Assembler, Awk, Beos, Basic, C, C++, C#, C# .net, .net, .net frameworks, Asp .net, Clarion, Clipper, Clos, Clu, Cobol, Coldfusion, Delphi, Dylan, Eiffel, Forth, Fortran, Haskell, Hermes, Icon, Idl, Java, Java script, Jscript .net, Jcl, Linoleum, Lisp, Lotus, Limbo, Logo, Ml, Mumps, Oberon, Postscript, Pop, Pl1, Prolog, Python, Ruby, Pascal, Perl, Php, Rebol, Rexx, Sed, Sather, Scheme, Smalltalk, Tcl, Vhdl, Vrml, Visual basic, Visual basic .net, Yorick, Mysql, Omnis, Postgresql, Xbase, Access, Oracle, Adabas, Berkeley, Btrieve, Filemaker, Gupta, Db2, Informix, Ingres, Mssql server, Object, Olap, Paradox, Rdb, Revelation, Sybase, Theory, Dbase, Html, Java script, Css, Flash, Photoshop, Corel script, Xml, Tech, Beos, Gem, Hp48, Hpux, Linux, Mac, Ms-dos, Os2, Palm, Solaris, Ti99, Windows, Xenix, Aos, Chorus, Geos, Inferno, Lantastic, Lynx, Mach, Minix, Netware, Os9, Parix, Plan9, Psos, Qnx, Xinu, Sco, Unix, Aix, Aux, 386bsd, Bsdi, Freebsd, Netbsd, Openbsd, Ultrix, Amd, Intel, Aptiva, Buz, Deals, Homebuilt, Overclocking, Programming, Extra forums


Copyright © 2006 SmartyDevil.com - Dies Mies Jeschet Boenedoesef Douvema Enitemaus -
666