Webdev.Webserver has stopped working - c#

When I execute the code saveXML below it generates the error above, why??
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
using System.Xml.Serialization;
using System.IO;
/// <summary>
/// Summary description for Post
/// </summary>
public class Post
{
private int postIDCounter = 0;
private String DateCreated;
public Post()
{
Author = "unknown";
Title = "unkown";
Content = "";
DateCreated = DateTime.Now.ToString();
ID = postIDCounter++;
}
public int ID
{
get { return ID; }
set
{
if (ID != value)
ID = value;
}
}
public string Author
{
get { return Author; }
set
{
if (Author != value)
Author = value;
}
}
public string Title
{
get { return Title; }
set
{
if (Title != value)
Title = value;
}
}
public string Content
{
get { return Content; }
set
{
if (Content != value)
Content = value;
}
}
public void saveXML()
{
XmlSerializer serializer = new XmlSerializer(typeof(Post));
Stream writer = new FileStream("..'\'App_Data'\'posts'\'" + new Guid(ID.ToString()).ToString() + ".xml", FileMode.Create);
serializer.Serialize(writer, this);
writer.Close();
}
}

All your variables are circular reference, that loops for ever and eventually your system stops / crash.
public string Content
{
get { return Content; }
For example, you say here, that get, return the Content, but the return is again the get Content, and get Content, and you understand ? is loop for ever in this line... and in all lines that you have something like that.
Try to do this way.
string inside_Content;
public string Content
{
get { return inside_Content; }
set { inside_Content = value;}
}

Related

How can I fix the issue with the input string in this cmdlet?

In the last month of so I have been trying to learn some C# with the aim of writing some PowerShell modules. I looked at some articles and documentation (Creating a client with C# - Microsoft.Management.Infrastructure) to try and put together a simple CIM cmdlet that would return the local network adapters.
The class library compiles okay, but when I run the command in PowerShell, it shows a format exception.
Show-LocalAdapter : Input string was not in a correct format.
In function based problems, I would normally see an issue with a line in the error reporting, but the error does not point me in the right direction with a cmdlet.
Hopefully someone here can help me as I have exhausted my, admittedly limited, knowledge on debugging this problem.
Here is the code for the cmdlet.
using System.Collections;
using System.Linq;
using System.Management.Automation;
using System.Text.RegularExpressions;
using Microsoft.Management.Infrastructure;
namespace NetTest
{
[Cmdlet(VerbsCommon.Show, "LocalAdapter")]
[OutputType(typeof(NetworkAdapter))]
public class ShowLocalAdapterCmdlet : PSCmdlet
{
private string[] _manufacturer;
private string _name;
private bool? _physicalAdapter;
private int _maxEntries = 100;
[Parameter(Position = 0, ValueFromPipeline = true, ValueFromPipelineByPropertyName = true)]
[Alias("Vendor")]
public string[] Manufacturer
{
get { return this._manufacturer; }
set { _manufacturer = value; }
}
[Parameter(Position = 1, ValueFromPipelineByPropertyName = true)]
public string Name
{
get { return this._name; }
set { _name = value; }
}
[Parameter(Position = 2, ValueFromPipelineByPropertyName = true)]
public bool? PhysicalAdapter
{
get { return this._physicalAdapter; }
set { _physicalAdapter = value; }
}
[Parameter(Position = 3)]
public int MaxEntries
{
get { return this._maxEntries; }
set { _maxEntries = value; }
}
protected override void BeginProcessing()
{
base.BeginProcessing();
}
protected override void ProcessRecord()
{
CimSession session = CimSession.Create("localHost");
IEnumerable cimResults = session.QueryInstances(#"root\cimv2", "WQL", "SELECT * FROM Win32_NetworkAdapter");
var query = cimResults.Cast<CimInstance>().Select(ReturnNetworkAdapter);
// Filter Name
if (Name != null)
{
query = query.Where(adapter => adapter.Name != null && adapter.Name.StartsWith(Name));
}
// Manufacturer Filter
if (Manufacturer != null)
{
query = query.Where(
adapter =>
adapter.Manufacturer != null &&
Regex.IsMatch(adapter.Manufacturer.ToString(),
string.Format("^(?:{0})", string.Join("|", Manufacturer))));
}
// Physical Adapter: true or false
if (PhysicalAdapter != null)
{
query = query.Where(adapter =>
adapter.PhysicalAdapter == PhysicalAdapter);
}
// Return objects
query.Take(MaxEntries).ToList().ForEach(WriteObject);
}
private static NetworkAdapter ReturnNetworkAdapter(CimInstance item)
{
return new NetworkAdapter
{
Name = item.CimInstanceProperties["Name"].ToString(),
Description = item.CimInstanceProperties["Description"].ToString(),
DeviceId = int.Parse(item.CimInstanceProperties["DeviceId"].ToString()),
Manufacturer = item.CimInstanceProperties["Manufacturer"].ToString(),
NetConnectionId = item.CimInstanceProperties["NetConnectionId"].ToString(),
PhysicalAdapter = bool.Parse(item.CimInstanceProperties["PhysicalAdapter"].ToString())
};
}
}
}
Here is the class for the network adapter object.
namespace NetTest
{
public class NetworkAdapter
{
private string _name;
private string _description;
private int _deviceId;
private string _manufacturer;
private string _netConnectionId;
private bool _physicalAdapter;
public string Name
{
get { return _name; }
set { _name = value; }
}
public string Description
{
get { return _description; }
set { _description = value; }
}
public int DeviceId
{
get { return _deviceId; }
set { _deviceId = value; }
}
public string Manufacturer
{
get { return _manufacturer; }
set { _manufacturer = value; }
}
public string NetConnectionId
{
get { return _netConnectionId; }
set { _netConnectionId = value; }
}
public bool PhysicalAdapter
{
get { return _physicalAdapter; }
set { _physicalAdapter = value; }
}
}
}
Calls like this item.CimInstanceProperties["Name"].ToString() is not what are you expecting. You should look at property Value:
private static NetworkAdapter ReturnNetworkAdapter(CimInstance item)
{
return new NetworkAdapter
{
Name = item.CimInstanceProperties["Name"].Value.ToString(),
Description = item.CimInstanceProperties["Description"].Value?.ToString(),
DeviceId = int.Parse(item.CimInstanceProperties["DeviceId"].Value.ToString()),
Manufacturer = item.CimInstanceProperties["Manufacturer"].Value?.ToString(),
NetConnectionId = item.CimInstanceProperties["NetConnectionId"].Value?.ToString(),
PhysicalAdapter = bool.Parse(item.CimInstanceProperties["PhysicalAdapter"].Value.ToString())
};
}

dictionaryApp,MVVM,WPF,reading from textFile

i am building a dictionary WPF application where you write a word and than the application tells u in what language the word is and also gives you a description of the word. Using MVVM.
Here is how it looks:
I have problem with finding out how to get the language and the description of word from a text file and put them in the text box, i dont mean the binding, but the exact method of getting the info.
Here is my Model:
using System;
using System.Collections.ObjectModel;
using System.Collections.Generic;
namespace dictionary
{
public class dictionaryModel
{
private string word;
private string language;
private string description;
public string Word
{
get
{
return word;
}
set
{
word = value;
}
}
public string Language
{
get
{
return language;
}
set
{
language = value;
}
}
public string Description
{
get
{
return description;
}
set
{
description = value;
}
}
public dictionaryModel(string describedWord, string WordLanguage, string WordDescription)
{
this.word = describedWord;
this.language = WordLanguage;
this.description = WordDescription;
}
public dictionaryModel()
{ }
}
and here is my View Model, so far:
namespace dictionary
{
using System;
using System.Collections.Generic;
using System.Collections.ObjectModel;
using System.ComponentModel;
using System.IO;
using System.Linq;
using System.Reflection;
using System.Runtime.CompilerServices;
using System.Text;
using System.Threading.Tasks;
using System.Windows;
using System.Windows.Data;
using System.Windows.Input;
using System.Windows.Markup;
public class dictionaryViewModel : INotifyPropertyChanged
{
private ICommand _getAnswer;
private dictionaryModel m;
private string w;
private string retLanguage;
private string retDescription;
private bool _canExecute;
public dictionaryViewModel()
{
_canExecute = true;
}
public string retLang
{
get
{
return retLanguage;
}
set
{
retLanguage = value;
NotifyPropertyChanged();
}
}
public string retDescr
{
get
{
return retDescription;
}
set
{
retDescription = value;
NotifyPropertyChanged();
}
}
public string word
{
get
{
return w;
}
set
{
w = value;
NotifyPropertyChanged();
}
}
public dictionaryModel model
{
get
{
return m;
}
set
{
m = value;
NotifyPropertyChanged();
}
}
public ICommand getAnswer
{
get
{
return _getAnswer ?? (_getAnswer = new RelayCommand(() => getWholeAnswer(word), _canExecute));
}
}
public dictionaryViewModel(dictionaryModel model, string word, string retLang, string retDescr,
ICommand getAnswer)
{
m = model;
w = word;
retLang = retLanguage;
retDescr = retDescription;
_getAnswer = getAnswer;
}
public ObservableCollection<dictionaryModel> readTxtFile()
{
ObservableCollection<dictionaryModel> dictObj = new ObservableCollection<dictionaryModel>();
string word;
string language;
string description;
var file = Path.Combine(Path.GetDirectoryName(Assembly.GetEntryAssembly().Location), "dictionary.txt");
StreamReader read = new StreamReader(file);
string line;
string[] item;
while((line=read.ReadLine())!=null)
{
item = line.Split(';');
word = item[0];
language = item[1];
description = item[2];
dictionaryModel object1 = new dictionaryModel(word, language, description);
dictObj.Add(object1);
}
read.Close();
return dictObj;
}
public void getWholeAnswer(string w)
{
string descr, lang;
dictionaryModel obj = null;
ObservableCollection<dictionaryModel> rdF = readTxtFile();
try
{
foreach(dictionaryModel a in rdF)
{
if(w.Equals(a))
{
descr = retDescr;
lang = retLang;
obj = a;
}
obj.Language = retLang;
obj.Description = retDescription;
}
}catch(Exception e)
{
ExceptionInfo();
}
}
private void ExceptionInfo()
{
throw new NotImplementedException();
}
private void NotifyPropertyChanged()
{
throw new NotImplementedException();
}
public event PropertyChangedEventHandler PropertyChanged;
}
}
The method is getWholeAnswer(). You see what i have tried, but no success. If you have any ideas, please help me out...
I think the problem is here:
if(w.Equals(a))
w is a string, while a is dictionaryModel, you are comparing two different kind of types without defining an equality logic.
Maybe you would replace that line with this?
if(string.Compare(w.Trim(), a.word, true) == 0)
string.Compare reference on MSDN
string.Trim reference on MSDN
i found my mistake, i am posting the solution of the method, it could be helpful to someone:
public void getWholeAnswer(string w)
{
dictionaryModel obj = null;
ObservableCollection<dictionaryModel> rdF = readTxtFile();
bool find = false;
try
{
foreach(dictionaryModel a in rdF)
{
if(w.Equals(a.Word))
{
obj = a;
retLang = a.Language;
retDescr = a.Description;
find = true;
break;
}
}
if(false == find)
{
AskTheQuestion();
}
}catch(Exception e)
{
AskTheQuestion();
}
}

XML Document has an error (3,4)

I'm trying to read a object from a XML doc with C# using the System.XML.
I created that doc with the same application, but when I try to read, I get "System.InvalidOperationException" in System.Xml.dll.
<?xml version="1.0"?>
<PKW xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance" xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Fahrzeug>
<Name>Testname</Name>
<Color>Rot</Color>
<Turen>5</Turen>
<Speed>80</Speed>
</Fahrzeug>
<Sitze>3</Sitze>
</PKW>
I try to read this XML with the following code...
System.Xml.Serialization.XmlSerializer reader = new System.Xml.Serialization.XmlSerializer(typeof(Fahrzeug.PKW));
System.IO.StreamReader file = new System.IO.StreamReader(#"Car.xml");
Auto = (Fahrzeug.PKW) reader.Deserialize(file);
file.Close();
Class:
using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;
namespace XML_test
{
public class Fahrzeug
{
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
private string color;
public string Color
{
get { return color; }
set { color = value; }
}
private int türen;
public int Türen
{
get { return türen; }
set { türen = value; }
}
private double speed;
public double Speed
{
get { return speed; }
set { speed = value; }
}
public Fahrzeug(string name,string color,int türen,double speed)
{
this.color = color;
this.türen= türen;
this.speed = speed;
this.Name = name;
}
private void Output()
{
Console.WriteLine("Color:\t" + this.color);
Console.WriteLine("Türen:\t" + this.Türen);
Console.WriteLine("Speed:\t" + this.speed);
}
public class PKW
{
private Fahrzeug fahrzeug;
public Fahrzeug Fahrzeug
{
get { return fahrzeug; }
set { fahrzeug = value; }
}
public PKW()
{
}
private int sitze;
public int Sitze
{
get { return sitze; }
set { sitze = value; }
}
public PKW(Fahrzeug F, int sitze)
{
this.fahrzeug = F;
this.sitze = sitze;
}
public void Output()
{
Fahrzeug.Output();
Console.WriteLine("Color:\t" + this.sitze);
}
}
}
}
Think if you move the PKW class outside the Fahrzeug class (so it's not an inner class any more) it might work. My guess is that it's not resolving PKW in the xml correctly.

Deserialization the json string gives Value cannot be null. Parameter name: s

"[{\"active\":true,\"campaignId\":11401,\"createdtime\":1355919181000,\"description\":\"Ankit Demo Edited By Nirav\",\"enddate\":1363132800000,\"groupId\":10179,\"isdeleted\":false,\"lastmodifiedby\":10405,\"modifiedtime\":1362556187000,\"name\":\"Ankit Demo\",\"noofweek\":12,\"organizationId\":11153,\"startdate\":1355875200000,\"status\":2,\"userId\":11161},
{\"active\":true,\"campaignId\":21901,\"createdtime\":1358493958000,\"description\":\"sdadadasd\",\"enddate\":1359072000000,\"groupId\":10179,\"isdeleted\":false,\"lastmodifiedby\":10405,\"modifiedtime\":1358751277000,\"name\":\"NEW CAMP TEST\",\"noofweek\":1,\"organizationId\":10707,\"startdate\":1358467200000,\"status\":4,\"userId\":10405},
{\"active\":true,\"campaignId\":33601,\"createdtime\":1361441582000,\"description\":\"dasdsadasd\",\"enddate\":1363219200000,\"groupId\":10179,\"isdeleted\":false,\"lastmodifiedby\":10405,\"modifiedtime\":1361795632000,\"name\":\"BHAVIK UTC\",\"noofweek\":3,\"organizationId\":10707,\"startdate\":1361404800000,\"status\":2,\"userId\":10405}]"
I have Above Jsong String in my string variable ..and i want to convert this json string into an object of my custom class..i have created the custom class ..
following is the code in which i getingg the response in json from HttpWebResponse and converting in list object of my custom class
HttpWebResponse response = default(HttpWebResponse);
try
{
response = (HttpWebResponse)request.GetResponse();
// response.Close()
string sResult = null;
using (StreamReader responseReader = new StreamReader(response.GetResponseStream()))
{
sResult = responseReader.ReadToEnd();
}
response.Close();
Console.WriteLine(sResult);
List<Class1> myDeserializedObjList = (List<Class1>)Newtonsoft.Json.JsonConvert.DeserializeObject(Request[sResult], typeof(List<Class1>));
int counts= myDeserializedObjList.Count;
}
but its giving me error
Value cannot be null.
Parameter name: s
Can anyone Please guide me how to solve this problem?
this is my custom class to which i want to assign the objects from json string
using System;
using System.Collections.Generic;
using System.Linq;
using System.Web;
/// <summary>
/// Summary description for Class1
/// </summary>
public class Class1
{
private Boolean active;
public Boolean Active
{
get { return active; }
set { active = value; }
}
private long campaignId;
public long CampaignId
{
get { return campaignId; }
set { campaignId = value; }
}
private long createdtime;
public long Createdtime
{
get { return createdtime; }
set { createdtime = value; }
}
private string description;
public string Description
{
get { return description; }
set { description = value; }
}
private long enddate;
public long Enddate
{
get { return enddate; }
set { enddate = value; }
}
private long groupId;
public long GroupId
{
get { return groupId; }
set { groupId = value; }
}
private Boolean isdeleted;
public Boolean Isdeleted
{
get { return isdeleted; }
set { isdeleted = value; }
}
private long modifiedtime;
public long Modifiedtime
{
get { return modifiedtime; }
set { modifiedtime = value; }
}
private long lastmodifiedby;
public long Lastmodifiedby
{
get { return lastmodifiedby; }
set { lastmodifiedby = value; }
}
private string name;
public string Name
{
get { return name; }
set { name = value; }
}
private int noofweek;
public int Noofweek
{
get { return noofweek; }
set { noofweek = value; }
}
private long organizationId;
public long OrganizationId
{
get { return organizationId; }
set { organizationId = value; }
}
private long startdate;
public long Startdate
{
get { return startdate; }
set { startdate = value; }
}
private Boolean status;
public Boolean Status
{
get { return status; }
set { status = value; }
}
private long userId;
public long UserId
{
get { return userId; }
set { userId = value; }
}
public Class1()
{
}
}
If your Request[sResult] is the json string you mentionned.
Try
Newtonsoft.Json.JsonConvert.DeserializeObject<List<Class1>>(Request[sResult]);
Edit, i mean :
List<Class1> myDeserializedObjList =Newtonsoft.Json.JsonConvert.DeserializeObject<List<Class1>>(Request[sResult]);

C# Xml Serialization & Deserialization

I am trying to serialize an object & save it into a Sql server 2008 xml field. I also have some deserialization code that re-hydrates the object. I am able to serialize & save the object into the db, but get a "Root element missing" exception.
[XmlRoot("Patient")]
public class PatientXml
{
private AddressXml _address = null;
private EmergencyContactXml _emergencyContact = null;
private PersonalXml _personal = null;
[XmlElement]
public PersonalXml Personal
{
get { return _personal; }
set { _personal = value; }
}
[XmlElement]
public AddressXml Address
{
get { return _address; }
set { _address = value; }
}
[XmlElement]
public EmergencyContactXml EmergencyContact
{
get { return _emergencyContact; }
set { _emergencyContact = value; }
}
public PatientXml(){}
public PatientXml(Patient patient)
{
_address = new AddressXml(patient.Address);
_emergencyContact = new EmergencyContactXml(patient.EmergencyInfo);
_personal = new PersonalXml(patient);
}
}
public class PersonalXml
{
private string _firstName = string.Empty, _lastName = string.Empty, _dateOfBirth = string.Empty, _phone = string.Empty;
[XmlAttribute]
public string FirstName
{
get { return _firstName; }
set { _firstName = value; }
}
[XmlAttribute]
public string LastName
{
get { return _lastName; }
set { _lastName = value; }
}
[XmlAttribute]
public string DateOfBirth
{
get { return _dateOfBirth; }
set { _dateOfBirth = value; }
}
[XmlAttribute]
public string Phone
{
get { return _phone; }
set { _phone = value; }
}
public PersonalXml(){}
public PersonalXml(Patient patient)
{
_firstName = patient.FirstName;
_lastName = patient.LastName;
_dateOfBirth = patient.DateOfBirth.ToShortDateString();
_phone = patient.Phone;
}
}
public class AddressXml
{
private string _address1 = string.Empty, _address2 = string.Empty, _city = string.Empty, _state = string.Empty, _zip = string.Empty;
[XmlAttribute]
public string Address1
{
get { return _address1; }
set { _address1 = value; }
}
[XmlAttribute]
public string Address2
{
get { return _address2; }
set { _address2 = value; }
}
[XmlAttribute]
public string City
{
get { return _city; }
set { _city = value; }
}
[XmlAttribute]
public string State
{
get { return _state; }
set { _state = value; }
}
[XmlAttribute]
public string Zip
{
get { return _zip; }
set { _zip = value; }
}
public AddressXml(){}
public AddressXml(Address address)
{
_address1 = address.Address1;
_address2 = address.Address2;
_city = address.City;
_state = address.State;
_zip = address.ZipCode;
}
}
public class EmergencyContactXml
{
private string _name = string.Empty, _phone = string.Empty, _relationship = string.Empty;
[XmlAttribute]
public string Name
{
get { return _name; }
set { _name = value; }
}
[XmlAttribute]
public string Phone
{
get { return _phone; }
set { _phone = value; }
}
[XmlAttribute]
public string Relationship
{
get { return _relationship; }
set { _relationship = value; }
}
public EmergencyContactXml(){}
public EmergencyContactXml(EmergencyContact contact)
{
_name = contact.ContactName;
_phone = contact.Phone;
_relationship = contact.Relationship;
}
}
Serialized Xml output:
<Patient
xmlns:xsi="http://www.w3.org/2001/XMLSchema-instance"
xmlns:xsd="http://www.w3.org/2001/XMLSchema">
<Personal FirstName="Test" LastName="User 1" DateOfBirth="3/13/1966" Phone="6304449866" />
<Address Address1="123 Some St" City="Bartlett" State="CT" Zip="60111" />
<EmergencyContact Name="Dr Chanduwarthana" Phone="6309769484" Relationship="Father" />
</Patient>
Serization & Deserialization code:
public static class XmlSerializer
{
public static string Serialize<T>(T item)
{
MemoryStream memStream = new MemoryStream();
using (XmlTextWriter textWriter = new XmlTextWriter(memStream, Encoding.Unicode))
{
System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(T));
serializer.Serialize(textWriter, item);
memStream = textWriter.BaseStream as MemoryStream;
}
if (memStream != null)
return Encoding.Unicode.GetString(memStream.ToArray());
else
return null;
}
public static T Deserialize<T>(string xmlString)
{
if (string.IsNullOrWhiteSpace(xmlString))
return default(T);
using (MemoryStream memStream = new MemoryStream())
{
using (XmlTextWriter textWriter = new XmlTextWriter(memStream, Encoding.Unicode))
{
memStream.Position = 0;
System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(T));
return (T)serializer.Deserialize(memStream);
}
}
}
}
In your deserialization code you're creating a MemoryStream and XmlTextWriter but you're not giving it the string to deserialize.
using (MemoryStream memStream = new MemoryStream())
{
using (XmlTextWriter textWriter = new XmlTextWriter(memStream, Encoding.Unicode))
{
// Omitted
}
}
You can pass the bytes to the memory stream and do away with the XmlTextWriter altogether.
using (MemoryStream memStream = new MemoryStream(Encoding.Unicode.GetBytes(xmlString)))
{
System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(T));
return (T)serializer.Deserialize(memStream);
}
Looks like you got a handle on serializing to XML, so take my advice, store the XML in a string field (varchar, nvarchar, text, ntext) and not a specialized field.
If you do that little switch you will be ready to go... no further modification required.
XML field is subject to validations, and more than a few headaches, and if your application is only producer and consumer of that field, you might as well take that shortcut.
SQL2008 (even 2005) is strong enough to compensate for the resources you might save by it compiling the xml field.
HOWEVER ,
I would optimize your code a bit, looks like you wrote way more code than you had to.
For example, you no longer need to create a private field to store the data from your property, for example :
public PersonalXml Personal
{
get { return _personal; }
set { _personal = value; }
}
will work just fine if you wrote it like :
public PersonalXml Personal { get ; set ; }
there's more fat you could have cut...
I believe that you need to add the XML header:
<?xml version="1.0" encoding="utf-8" ?>
You could modify your serialize method to accept an optional parameter that would cause this to be added:
public static string Serialize<T>(T item, bool includeHeader = false)
{
MemoryStream memStream = new MemoryStream();
using (XmlTextWriter textWriter = new XmlTextWriter(memStream, Encoding.Unicode))
{
System.Xml.Serialization.XmlSerializer serializer = new System.Xml.Serialization.XmlSerializer(typeof(T));
serializer.Serialize(textWriter, item);
memStream = textWriter.BaseStream as MemoryStream;
}
if (memStream != null)
if (includeHeader)
{
return #"<?xml version=""1.0"" encoding=""utf-8"" ?>" + Environment.NewLine + Encoding.Unicode.GetString(memStream.ToArray());
}
else
{
return Encoding.Unicode.GetString(memStream.ToArray());
}
else
return null;
}

Categories