Sign Up

Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.

Have an account? Sign In

Have an account? Sign In Now

Sign In

Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.

Sign Up Here

Forgot Password?

Don't have account, Sign Up Here

Forgot Password

Lost your password? Please enter your email address. You will receive a link and will create a new password via email.

Have an account? Sign In Now

You must login to ask a question.

Forgot Password?

Need An Account, Sign Up Here

Please briefly explain why you feel this question should be reported.

Please briefly explain why you feel this answer should be reported.

Please briefly explain why you feel this user should be reported.

Sign InSign Up

The Archive Base

The Archive Base Logo The Archive Base Logo

The Archive Base Navigation

  • SEARCH
  • Home
  • About Us
  • Blog
  • Contact Us
Search
Ask A Question

Mobile menu

Close
Ask a Question
  • Home
  • Add group
  • Groups page
  • Feed
  • User Profile
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Buy Points
  • Users
  • Help
  • Buy Theme
  • SEARCH
Home/ Questions/Q 7799911
In Process

The Archive Base Latest Questions

Editorial Team
  • 0
Editorial Team
Asked: June 2, 20262026-06-02T00:27:43+00:00 2026-06-02T00:27:43+00:00

// Reference.cs // Conveintly serializable [System.CodeDom.Compiler.GeneratedCodeAttribute(System.Xml, 4.0.30319.225)] [System.SerializableAttribute()] [System.Diagnostics.DebuggerStepThroughAttribute()] [System.ComponentModel.DesignerCategoryAttribute(code)] [System.Xml.Serialization.XmlTypeAttribute(Namespace=urn:schemas-sc-jp:mfp:osa-1-1)] public partial class

  • 0
// Reference.cs
// Conveintly serializable
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:schemas-sc-jp:mfp:osa-1-1")]
public partial class CREDENTIALS_TYPE : CREDENTIALS_BASE_TYPE {

    private string datatypeField;

    private OPAQUE_DATA_TYPE metadataField;

    /// <remarks/>
    [System.Xml.Serialization.XmlElementAttribute("data-type")]
    public string datatype {
        get {
            return this.datatypeField;
        }
        set {
            this.datatypeField = value;
        }
    }

    /// <remarks/>
    public OPAQUE_DATA_TYPE metadata {
        get {
            return this.metadataField;
        }
        set {
            this.metadataField = value;
        }
    }
}

/// <remarks/>
[System.CodeDom.Compiler.GeneratedCodeAttribute("System.Xml", "4.0.30319.225")]
[System.SerializableAttribute()]
[System.Diagnostics.DebuggerStepThroughAttribute()]
[System.ComponentModel.DesignerCategoryAttribute("code")]
[System.Xml.Serialization.XmlTypeAttribute(Namespace="urn:schemas-sc-jp:mfp:osa-1-1")]
public partial class OPAQUE_DATA_TYPE {

    private System.Xml.XmlElement[] anyField;

    private System.Xml.XmlAttribute[] anyAttrField;

    /// <remarks/>
    [System.Xml.Serialization.XmlAnyElementAttribute()]
    public System.Xml.XmlElement[] Any {
        get {
            return this.anyField;
        }
        set {
            this.anyField = value;
        }
    }

    /// <remarks/>
    [System.Xml.Serialization.XmlAnyAttributeAttribute()]
    public System.Xml.XmlAttribute[] AnyAttr {
        get {
            return this.anyAttrField;
        }
        set {
            this.anyAttrField = value;
        }
    }
}

I have a webmethod which gets data from a device on the network, part of this data is the credentials used to authorise with the device.

We are using an API, so to recieve this data I must have the CREDENTIALS_TYPE as a parameter type in the webmethod. What I need to do is save this data, so it can be aquired without the webmethod.

Now I have serialized classes to XML files before, so I went with the familiar option, but only with classes of my own creation. I would like to know if it’s actually possible to do the same thing with a referenced class that isn’t mine?

I have to create a class that matches CREDENTIALS_TYPE and copy the data across but I haven’t been able to find a way to convert between the different types.

The “CREDENTAILS_TYPE” is coming from an MFP, so reflecting and changing the code is no good in my situation because I couldn’t update it anyway.

Any suggestions/advice?

  • 1 1 Answer
  • 0 Views
  • 0 Followers
  • 0
Share
  • Facebook
  • Report

Leave an answer
Cancel reply

You must login to add an answer.

Forgot Password?

Need An Account, Sign Up Here

1 Answer

  • Voted
  • Oldest
  • Recent
  • Random
  1. Editorial Team
    Editorial Team
    2026-06-02T00:27:46+00:00Added an answer on June 2, 2026 at 12:27 am

    Since you can’t modify a class you don’t own the source code to, create your own DTO with the serialization attributes you require and then use Automapper to transfer the field data back and forth between the two.

    • 0
    • Reply
    • Share
      Share
      • Share on Facebook
      • Share on Twitter
      • Share on LinkedIn
      • Share on WhatsApp
      • Report

Sidebar

Related Questions

Object reference not set to an instance of an object. using System; using System.Collections.Generic;
Reference: Public Const COLUMN_MODEL_ORDER As String = MDL_ORDER.ColumnName DataModel.Config.DefaultView is a System.Data.DataView What is
Undefined reference error refers to missing declaration or the definition or both? Compiler: GCC
In reference to this question, Flex/ActionScript - XML I am able to get the
For reference, the code is for the motorola 68008. Say I have code such
In reference to this answer to a Stack Overflow question : what is bench-testing
I reference the current page in a class with Page page = HttpContext.Current.CurrentHandler as
For reference, I'm using Visual Studio 2010. I have a custom build step defined
With reference to the following link: http://docs.python.org/faq/library.html#what-kinds-of-global-value-mutation-are-thread-safe I wanted to know if the following:
In reference to GCC's Zero Length Array explanation: This is particularly useful in the

Explore

  • Home
  • Add group
  • Groups page
  • Communities
  • Questions
    • New Questions
    • Trending Questions
    • Must read Questions
    • Hot Questions
  • Polls
  • Tags
  • Badges
  • Users
  • Help
  • SEARCH

Footer

© 2021 The Archive Base. All Rights Reserved
With Love by The Archive Base

Insert/edit link

Enter the destination URL

Or link to existing content

    No search term specified. Showing recent items. Search or use up and down arrow keys to select an item.