Skype for Business Online的某些Camdlet会返回对象,例如Get-CsOnlineUser返回Microsoft.Rtc.Management.ADConnect.Schema.OCSADUser,但我没有在网上找到任何描述此对象的位置。这里有人知道如何获取描述其属性/方法的文档吗?
答案 0 :(得分:0)
您可以使用int array_count = 0;
Element e1;
ifstream Stream(filename); // Periodic Table Object
ofstream setup("test.txt");
ofstream output("Molecule_list.txt");
string file_contents; //string to store buffer line
istreambuf_iterator<char> i_file(Stream); //open filestream buffer iterator
//string line = Acc_element(fname);
istreambuf_iterator<char> eof; //open end of file streambuffer
while (i_file != eof)
{
string slash = "/";
file_contents += *i_file;
if (*i_file == '\n')
{
array_count = array_count + 1;
/////////////Create Element List
size_t found1 = file_contents.find(slash); //placement of slash
size_t found2 = file_contents.find(slash, (found1)+1); //placement of slash 2
size_t found3 = file_contents.find(slash, (found2)+1); //placement of slash 3
size_t found4 = file_contents.find(slash, (found3)+1); //placement of slash 4
size_t found5 = file_contents.find(slash, (found4)+1); //placement of slash 5
size_t found6 = file_contents.find(slash, (found5)+1); //placement of slash 6
string name = file_contents.substr(0, found1); //create string for the name
string formula = file_contents.substr(found1 + 1, (found2-found1)-1);
string iupac = file_contents.substr(found2 + 1, (found3-found2)-1);
string m_class = file_contents.substr(found3 + 1, (found4 - found3)-1);
string m_sub_class = file_contents.substr(found4 + 1, (found5 - found4)-1);
size_t endcount = (found5 - found4) - 1;
string mass = file_contents.substr(found5 + 1, (found6 - found5) - 4);
/////THE stof function is what creates the error
size_t endlpos;
if ((endlpos = mass.find('\n')) != string::npos)
mass.erase(endlpos);
stof(mass);
// i think the endline causes the error float mass_f = stof(mass);
//cout << array_count<<endl;
setup << "Molecule " << formula << ";" << endl; // Create Element line
/* Needed for the actual reading of files to add chemicals.
Element_array[array_count].E_mass = stof(mass);
Element_array[array_count].E_name = name;
Element_array[array_count].E_formula = formula;
*/
output << name << "." << "M_name = " << "\"" << name << "\"" << ";" << endl; //create the Name line
output << name << "." << "M_formula =" << "\"" << formula << "\"" << ";" << endl;
output << name << "." << "M_iupac = " << iupac << endl;
output << name << "." << "M_class = " << m_class << endl;
output << name << "." << "M_sub_class = " << m_sub_class << endl;
cout.setf(ios::fixed);
output << name << "." << "M_mass = " << mass;
file_contents.clear();
}
i_file++;
}
return;
cmdlet列出对象的属性和方法。
出于您的目的,您可以这样使用它:
Get-Member
然后控制台将打印出属性和方法列表。 此外,您可以通过&#34;运行&#34;来获取方法的重载。没有任何给定参数的方法如下:
Get-CsOnlineUser | Get-Member