Ejemplo n.º 1
0
 /// <summary>
 /// Deserializes workflow markup into an ResourcePackageManifestOperationsOperationParametersParameter object
 /// </summary>
 /// <param name="xml">string workflow markup to deserialize</param>
 /// <param name="obj">Output ResourcePackageManifestOperationsOperationParametersParameter object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
 public static bool Deserialize(string xml, out ResourcePackageManifestOperationsOperationParametersParameter obj, out System.Exception exception)
 {
     exception = null;
     obj       = default(ResourcePackageManifestOperationsOperationParametersParameter);
     try {
         obj = Deserialize(xml);
         return(true);
     }
     catch (System.Exception ex) {
         exception = ex;
         return(false);
     }
 }
Ejemplo n.º 2
0
 /// <summary>
 /// Deserializes xml markup from file into an ResourcePackageManifestOperationsOperationParametersParameter object
 /// </summary>
 /// <param name="fileName">string xml file to load and deserialize</param>
 /// <param name="obj">Output ResourcePackageManifestOperationsOperationParametersParameter object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
 public static bool LoadFromFile(string fileName, out ResourcePackageManifestOperationsOperationParametersParameter obj, out System.Exception exception)
 {
     exception = null;
     obj       = default(ResourcePackageManifestOperationsOperationParametersParameter);
     try {
         obj = LoadFromFile(fileName);
         return(true);
     }
     catch (System.Exception ex) {
         exception = ex;
         return(false);
     }
 }
Ejemplo n.º 3
0
 public static bool LoadFromFile(string fileName, out ResourcePackageManifestOperationsOperationParametersParameter obj)
 {
     System.Exception exception = null;
     return(LoadFromFile(fileName, out obj, out exception));
 }
Ejemplo n.º 4
0
 public static bool Deserialize(string xml, out ResourcePackageManifestOperationsOperationParametersParameter obj)
 {
     System.Exception exception = null;
     return(Deserialize(xml, out obj, out exception));
 }
Ejemplo n.º 5
0
        private void AddResourceData(ResourcePackageManifest manifest, string resourceId, string contentType, string type, string name, string filename, long size)
        {
            ResourcePackageManifestOperationsOperation op = new ResourcePackageManifestOperationsOperation();
            op.Name = "SETRESOURCEDATA"; //NOXLATE
            op.Version = "1.0.0"; //NOXLATE
            op.Parameters = new ResourcePackageManifestOperationsOperationParameters();
            op.Parameters.Parameter = new System.ComponentModel.BindingList<ResourcePackageManifestOperationsOperationParametersParameter>();

            ResourcePackageManifestOperationsOperationParametersParameter param = new ResourcePackageManifestOperationsOperationParametersParameter();

            param.Name = "DATA"; //NOXLATE
            param.Value = filename;
            param.ContentType = contentType;
            op.Parameters.Parameter.Add(param);

            param = new ResourcePackageManifestOperationsOperationParametersParameter();
            param.Name = "DATALENGTH"; //NOXLATE
            param.Value = size.ToString();
            op.Parameters.Parameter.Add(param);

            param = new ResourcePackageManifestOperationsOperationParametersParameter();
            param.Name = "DATANAME"; //NOXLATE
            param.Value = name;
            op.Parameters.Parameter.Add(param);

            param = new ResourcePackageManifestOperationsOperationParametersParameter();
            param.Name = "DATATYPE";
            param.Value = type;
            op.Parameters.Parameter.Add(param);

            param = new ResourcePackageManifestOperationsOperationParametersParameter();
            param.Name = "RESOURCEID"; //NOXLATE
            param.Value = resourceId;
            op.Parameters.Parameter.Add(param);

            manifest.Operations.Operation.Add(op);
        }
Ejemplo n.º 6
0
        private void AddFolderResource(ResourcePackageManifest manifest, string resourceId, string headerpath, bool eraseFirst)
        {
            if (eraseFirst)
            {
                ResourcePackageManifestOperationsOperation delop = new ResourcePackageManifestOperationsOperation();
                delop.Name = "DELETERESOURCE"; //NOXLATE
                delop.Version = "1.0.0"; //NOXLATE
                delop.Parameters = new ResourcePackageManifestOperationsOperationParameters();
                delop.Parameters.Parameter = new System.ComponentModel.BindingList<ResourcePackageManifestOperationsOperationParametersParameter>();

                ResourcePackageManifestOperationsOperationParametersParameter delparam = new ResourcePackageManifestOperationsOperationParametersParameter();

                delparam.Name = "RESOURCEID"; //NOXLATE
                delparam.Value = resourceId;
                delop.Parameters.Parameter.Add(delparam);
                manifest.Operations.Operation.Add(delop);
            }

            ResourcePackageManifestOperationsOperation op = new ResourcePackageManifestOperationsOperation();
            if (resourceId.EndsWith("//")) //NOXLATE
                op.Name = "UPDATEREPOSITORY"; //NOXLATE
            else
                op.Name = "SETRESOURCE"; //NOXLATE
            op.Version = "1.0.0"; //NOXLATE
            op.Parameters = new ResourcePackageManifestOperationsOperationParameters();
            op.Parameters.Parameter = new System.ComponentModel.BindingList<ResourcePackageManifestOperationsOperationParametersParameter>();

            ResourcePackageManifestOperationsOperationParametersParameter param = new ResourcePackageManifestOperationsOperationParametersParameter();

            param.Name = "HEADER"; //NOXLATE
            param.Value = headerpath;
            param.ContentType = "text/xml"; //NOXLATE
            op.Parameters.Parameter.Add(param);

            param = new ResourcePackageManifestOperationsOperationParametersParameter();
            param.Name = "RESOURCEID"; //NOXLATE
            param.Value = resourceId;
            op.Parameters.Parameter.Add(param);

            manifest.Operations.Operation.Add(op);
        }
 public static bool LoadFromFile(string fileName, out ResourcePackageManifestOperationsOperationParametersParameter obj) {
     System.Exception exception = null;
     return LoadFromFile(fileName, out obj, out exception);
 }
 /// <summary>
 /// Deserializes xml markup from file into an ResourcePackageManifestOperationsOperationParametersParameter object
 /// </summary>
 /// <param name="fileName">string xml file to load and deserialize</param>
 /// <param name="obj">Output ResourcePackageManifestOperationsOperationParametersParameter object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
 public static bool LoadFromFile(string fileName, out ResourcePackageManifestOperationsOperationParametersParameter obj, out System.Exception exception) {
     exception = null;
     obj = default(ResourcePackageManifestOperationsOperationParametersParameter);
     try {
         obj = LoadFromFile(fileName);
         return true;
     }
     catch (System.Exception ex) {
         exception = ex;
         return false;
     }
 }
 public static bool Deserialize(string xml, out ResourcePackageManifestOperationsOperationParametersParameter obj) {
     System.Exception exception = null;
     return Deserialize(xml, out obj, out exception);
 }
 /// <summary>
 /// Deserializes workflow markup into an ResourcePackageManifestOperationsOperationParametersParameter object
 /// </summary>
 /// <param name="xml">string workflow markup to deserialize</param>
 /// <param name="obj">Output ResourcePackageManifestOperationsOperationParametersParameter object</param>
 /// <param name="exception">output Exception value if deserialize failed</param>
 /// <returns>true if this XmlSerializer can deserialize the object; otherwise, false</returns>
 public static bool Deserialize(string xml, out ResourcePackageManifestOperationsOperationParametersParameter obj, out System.Exception exception) {
     exception = null;
     obj = default(ResourcePackageManifestOperationsOperationParametersParameter);
     try {
         obj = Deserialize(xml);
         return true;
     }
     catch (System.Exception ex) {
         exception = ex;
         return false;
     }
 }