public static string ToString(cls x) { switch (x) { case cls.VM: return("VM"); case cls.Host: return("Host"); case cls.SR: return("SR"); case cls.Pool: return("Pool"); case cls.VMPP: return("VMPP"); case cls.PVS_proxy: return("PVS_proxy"); default: return("unknown"); } }
public static string StringOf(this cls x) { switch (x) { case cls.VM: return("VM"); case cls.Host: return("Host"); case cls.SR: return("SR"); case cls.Pool: return("Pool"); case cls.VMPP: return("VMPP"); case cls.VMSS: return("VMSS"); case cls.PVS_proxy: return("PVS_proxy"); case cls.VDI: return("VDI"); default: return("unknown"); } }
public static void Main() { cls c = new cls(); c.OnWhatever += new OnWhateverDelegate(Whatever); c.CallMyDel("test"); }
private static void Main(string[] args) { cls r1 = new cls(10); cls r2 = new cls(20); stc s1 = new stc(10); stc s2 = new stc(20); Console.WriteLine("r1.x:{0}, r2.x:{1}, s1.x:{2}, s2.x:{3}", r1.x, r2.x, s1.x, s2.x); r1 = r2; s1 = s2; Console.WriteLine("r1=r2, s1=s2"); Console.WriteLine("r1.x:{0}, r2.x:{1}, s1.x:{2}, s2.x:{3}", r1.x, r2.x, s1.x, s2.x); r2.x = 100; s1.x = 200; Console.WriteLine("r1=r2, s1=s2"); Console.WriteLine("r1.x:{0}, r2.x:{1}, s1.x:{2}, s2.x:{3}", r1.x, r2.x, s1.x, s2.x); Console.ReadKey(); }
/// <summary> /// /// First published in XenServer 5.0. /// </summary> /// <param name="session">The session</param> /// <param name="_cls">The class of object</param> /// <param name="_obj_uuid">The uuid of the object</param> /// <param name="_since">The cutoff time</param> public static Dictionary <XenRef <Message>, Message> get(Session session, cls _cls, string _obj_uuid, DateTime _since) { if (session.JsonRpcClient != null) { return(session.JsonRpcClient.message_get(session.opaque_ref, _cls, _obj_uuid, _since)); } else { return(XenRef <Message> .Create <Proxy_Message>(session.proxy.message_get(session.opaque_ref, cls_helper.ToString(_cls), _obj_uuid ?? "", _since).parse())); } }
public Message(string uuid, string name, long priority, cls cls, string obj_uuid, DateTime timestamp, string body) { this.uuid = uuid; this.name = name; this.priority = priority; this.cls = cls; this.obj_uuid = obj_uuid; this.timestamp = timestamp; this.body = body; }
public static string ToString(cls x) { switch (x) { case cls.VM: return "VM"; case cls.Host: return "Host"; case cls.SR: return "SR"; case cls.Pool: return "Pool"; case cls.VMPP: return "VMPP"; default: return "unknown"; } }
static void Main(string[] args) { stc kareals = new stc(); cls karealc = new cls(); Console.Write("Karesi alınacak sayıyı giriniz :"); int sayi = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("class : sayi * sayi = " + karealc.kare(sayi)); Console.Write("Karesi alınacak sayıyı giriniz :"); sayi = Convert.ToInt32(Console.ReadLine()); Console.WriteLine("class : sayi * sayi = " + kareals.kare(sayi)); Console.ReadKey(); }
protected void GridView1_RowCommand(object sender, GridViewCommandEventArgs e) { if (e.CommandName == "Insert") { using (dbcms db = new dbcms()) { cls c1 = new cls(); var footer = ((GridView)sender).FooterRow; c1.name = ((TextBox)footer.Cells[1].FindControl("t1")).Text; c1.keywords = ((TextBox)footer.Cells[1].FindControl("t2")).Text; c1.description = ((TextBox)footer.Cells[1].FindControl("t3")).Text; string jb = ((DropDownList)footer.Cells[1].FindControl("drop")).Text; try { c1.sort = Convert.ToInt32(((TextBox)footer.Cells[1].FindControl("t5")).Text); } catch { c1.sort = null; } clsRepository cr = new clsRepository(db); c1.id = cr.MaxId() + 1; if (jb != "0") { c1.jb = db.cls.Where(d => d.id == Convert.ToInt32(jb)).First().jb + c1.id + "|"; } else { c1.jb = c1.id + "|"; } c1.display = true; db.cls.InsertOnSubmit(c1); db.SubmitChanges(); GridView1.DataBind(); } } }
/// <summary> /// /// First published in XenServer 5.0. /// </summary> /// <param name="session">The session</param> /// <param name="_name">The name of the message</param> /// <param name="_priority">The priority of the message</param> /// <param name="_cls">The class of object this message is associated with</param> /// <param name="_obj_uuid">The uuid of the object this message is associated with</param> /// <param name="_body">The body of the message</param> public static XenRef <Message> create(Session session, string _name, long _priority, cls _cls, string _obj_uuid, string _body) { if (session.JsonRpcClient != null) { return(session.JsonRpcClient.message_create(session.opaque_ref, _name, _priority, _cls, _obj_uuid, _body)); } else { return(XenRef <Message> .Create(session.proxy.message_create(session.opaque_ref, _name ?? "", _priority.ToString(), cls_helper.ToString(_cls), _obj_uuid ?? "", _body ?? "").parse())); } }
internal void CallParentDel(cls c, string s) { c.OnWhatever(s); }
static void Main(string[] args) { Univ u = new Univ(); cls my = new cls(); }
public static string extensionCls(this cls c, string s) { return("extensionCls: " + s); }
/// <summary> /// /// First published in XenServer 5.0. /// </summary> /// <param name="session">The session</param> /// <param name="_name">The name of the message</param> /// <param name="_priority">The priority of the message</param> /// <param name="_cls">The class of object this message is associated with</param> /// <param name="_obj_uuid">The uuid of the object this message is associated with</param> /// <param name="_body">The body of the message</param> public static XenRef <Message> create(Session session, string _name, long _priority, cls _cls, string _obj_uuid, string _body) { return(XenRef <Message> .Create(session.proxy.message_create(session.uuid, _name ?? "", _priority.ToString(), cls_helper.ToString(_cls), _obj_uuid ?? "", _body ?? "").parse())); }
public static void Main () { cls a = new cls (); a.I = 10; cls b = new cls (a); Console.WriteLine (b.I); }
public static string ToString(cls x) { return(x.StringOf()); }
public cls (cls right) { i = right.i; // No Error: Private member of same type is accessible }
static void Main() { cls c = new cls(); c.OnWhatever += new OnWhateverDelegate( Whatever ); c.CallMyDel( "test" ); }
/// <summary> /// /// First published in XenServer 5.0. /// </summary> /// <param name="session">The session</param> /// <param name="_name">The name of the message</param> /// <param name="_priority">The priority of the message</param> /// <param name="_cls">The class of object this message is associated with</param> /// <param name="_obj_uuid">The uuid of the object this message is associated with</param> /// <param name="_body">The body of the message</param> public static XenRef <Message> create(Session session, string _name, long _priority, cls _cls, string _obj_uuid, string _body) { return(XenRef <Message> .Create(session.proxy.message_create(session.uuid, (_name != null) ? _name : "", _priority.ToString(), cls_helper.ToString(_cls), (_obj_uuid != null) ? _obj_uuid : "", (_body != null) ? _body : "").parse())); }
/// <summary> /// /// First published in XenServer 5.0. /// </summary> /// <param name="session">The session</param> /// <param name="_cls">The class of object</param> /// <param name="_obj_uuid">The uuid of the object</param> /// <param name="_since">The cutoff time</param> public static Dictionary <XenRef <Message>, Message> get(Session session, cls _cls, string _obj_uuid, DateTime _since) { return(XenRef <Message> .Create <Proxy_Message>(session.proxy.message_get(session.uuid, cls_helper.ToString(_cls), (_obj_uuid != null) ? _obj_uuid : "", _since).parse())); }
internal void CallParentDel( cls c, string s ) { c.OnWhatever( s ); }