question-mark
Stuck on an issue?

Lightrun Answers was designed to reduce the constant googling that comes with debugging 3rd party libraries. It collects links to all the places you might be looking at while hunting down a tough bug.

And, if you’re still stuck at the end, we’re happy to hop on a call to see how we can help out.

Add Configuration API

See original GitHub issue

ExtendedXmlSerializer should have a configuration API that allows users to setup the configuration of the serializer and then instantiate it accordingly. From https://github.com/wojtpl2/ExtendedXmlSerializer/issues/20#issuecomment-266399371:

//Without configuratino
var serializer = new ExtendedXmlSerializer();
// with configuration
var serializer = new ExtendedXmlSerializer(config);
// or from configuration
var serializer= config.CreateSerializer();
In configuration you will be able to configure all settings:

for example:

ExtendedXmlSerializer.Initialize(cfg =>{
cfg.ConfigType<OtherClass>()
.Property(p=>p.Id).ObjectReference().AsAttribute()
.Property(p=>p.Password).Encrypt()
.Property(p=>p.UserName).ChangeName("User").Order(1)
.AddExtension(AttachedPropertyToOtherClass);

cfg.UseAutoProperties();
cfg.UseNamespaces();
cfg.AddExtension(AttachedPropertyToAllTypeExtension);
});

Issue Analytics

  • State:closed
  • Created 7 years ago
  • Comments:10 (10 by maintainers)

github_iconTop GitHub Comments

1reaction
WojciechNagorskicommented, Dec 14, 2016

Yes it is good result for this moment!

1reaction
WojciechNagorskicommented, Dec 13, 2016

276us sounds better 😃

Read more comments on GitHub >

github_iconTop Results From Across the Web

Creating an API configuration
Select Settings > API Configuration. You can view a list of existing API configurations, or search by name. You can use the arrow...
Read more >
How to Use the Configuration API
Go to /login > Management > API Configuration. · Under API Accounts, click Add. · Enter a name to identify your new API...
Read more >
Add an API manually using the Azure portal
Navigate to your API Management service in the Azure portal and select APIs from the menu. From the left menu, select + Add...
Read more >
Creating an API config | API Gateway Documentation
Upload the API definition to create a new API config. Use the same command to create the new API config as you used...
Read more >
CreateConfigurationProfile - AWS AppConfig
Creates a configuration profile, which is information that enables AWS AppConfig to access the configuration source. Valid configuration sources include the ...
Read more >

github_iconTop Related Medium Post

No results found

github_iconTop Related StackOverflow Question

No results found

github_iconTroubleshoot Live Code

Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free

github_iconTop Related Reddit Thread

No results found

github_iconTop Related Hackernoon Post

No results found

github_iconTop Related Tweet

No results found

github_iconTop Related Dev.to Post

No results found

github_iconTop Related Hashnode Post

No results found