private static void Handle_About (
					MeshServerShell Dispatch, string[] args, int index) {
			About		Options = new About ();

			var Registry = new Goedel.Registry.Registry ();



#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_About TagType = (TagType_About) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.About (Options);

			}
		private static void Handle_Start (
					MeshServerShell Dispatch, string[] args, int index) {
			Start		Options = new Start ();

			var Registry = new Goedel.Registry.Registry ();

			Options.Address.Register ("address", Registry, (int) TagType_Start.Address);
			Options.MeshStore.Register ("mesh", Registry, (int) TagType_Start.MeshStore);
			Options.PortalStore.Register ("mesh", Registry, (int) TagType_Start.PortalStore);
			Options.Verify.Register ("verify", Registry, (int) TagType_Start.Verify);

			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.Address.Parameter (args [index]);
				index++;
				}

#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_Start TagType = (TagType_Start) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_Start.MeshStore : {
						int OptionParams = Options.MeshStore.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.MeshStore.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Start.PortalStore : {
						int OptionParams = Options.PortalStore.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.PortalStore.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Start.Verify : {
						int OptionParams = Options.Verify.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Verify.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.Start (Options);

			}
示例#3
0
		private static void Handle_Label (
					Shell Dispatch, string[] args, int index) {
			Label		Options = new Label ();

			var Registry = new Goedel.Registry.Registry ();

			Options.Portal.Register ("portal", Registry, (int) TagType_Label.Portal);
			Options.UDF.Register ("udf", Registry, (int) TagType_Label.UDF);


#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_Label TagType = (TagType_Label) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_Label.Portal : {
						int OptionParams = Options.Portal.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Portal.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Label.UDF : {
						int OptionParams = Options.UDF.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.UDF.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.Label (Options);

			}
示例#4
0
		private static void Handle_Personal (
					Shell Dispatch, string[] args, int index) {
			Personal		Options = new Personal ();

			var Registry = new Goedel.Registry.Registry ();

			Options.Portal.Register ("portal", Registry, (int) TagType_Personal.Portal);
			Options.Description.Register ("pd", Registry, (int) TagType_Personal.Description);
			Options.Verbose.Register ("verbose", Registry, (int) TagType_Personal.Verbose);
			Options.Report.Register ("report", Registry, (int) TagType_Personal.Report);
			Options.DeviceNew.Register ("new", Registry, (int) TagType_Personal.DeviceNew);
			Options.DeviceUDF.Register ("dudf", Registry, (int) TagType_Personal.DeviceUDF);
			Options.DeviceID.Register ("did", Registry, (int) TagType_Personal.DeviceID);
			Options.DeviceDescription.Register ("dd", Registry, (int) TagType_Personal.DeviceDescription);

			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.Portal.Parameter (args [index]);
				index++;
				}
			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.Description.Parameter (args [index]);
				index++;
				}

#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_Personal TagType = (TagType_Personal) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_Personal.Verbose : {
						int OptionParams = Options.Verbose.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Verbose.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Personal.Report : {
						int OptionParams = Options.Report.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Report.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Personal.DeviceNew : {
						int OptionParams = Options.DeviceNew.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.DeviceNew.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Personal.DeviceUDF : {
						int OptionParams = Options.DeviceUDF.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.DeviceUDF.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Personal.DeviceID : {
						int OptionParams = Options.DeviceID.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.DeviceID.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Personal.DeviceDescription : {
						int OptionParams = Options.DeviceDescription.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.DeviceDescription.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.Personal (Options);

			}
示例#5
0
		private static void Handle_Device (
					Shell Dispatch, string[] args, int index) {
			Device		Options = new Device ();

			var Registry = new Goedel.Registry.Registry ();

			Options.DeviceID.Register ("id", Registry, (int) TagType_Device.DeviceID);
			Options.DeviceDescription.Register ("dd", Registry, (int) TagType_Device.DeviceDescription);
			Options.Default.Register ("default", Registry, (int) TagType_Device.Default);

			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.DeviceID.Parameter (args [index]);
				index++;
				}
			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.DeviceDescription.Parameter (args [index]);
				index++;
				}

#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_Device TagType = (TagType_Device) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_Device.Default : {
						int OptionParams = Options.Default.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Default.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.Device (Options);

			}
示例#6
0
		private static void Handle_Escrow (
					Shell Dispatch, string[] args, int index) {
			Escrow		Options = new Escrow ();

			var Registry = new Goedel.Registry.Registry ();

			Options.Quorum.Register ("quorum", Registry, (int) TagType_Escrow.Quorum);
			Options.Shares.Register ("shares", Registry, (int) TagType_Escrow.Shares);
			Options.Portal.Register ("portal", Registry, (int) TagType_Escrow.Portal);
			Options.UDF.Register ("udf", Registry, (int) TagType_Escrow.UDF);
			Options.Verbose.Register ("verbose", Registry, (int) TagType_Escrow.Verbose);
			Options.Report.Register ("report", Registry, (int) TagType_Escrow.Report);


#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_Escrow TagType = (TagType_Escrow) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_Escrow.Quorum : {
						int OptionParams = Options.Quorum.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Quorum.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Escrow.Shares : {
						int OptionParams = Options.Shares.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Shares.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Escrow.Portal : {
						int OptionParams = Options.Portal.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Portal.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Escrow.UDF : {
						int OptionParams = Options.UDF.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.UDF.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Escrow.Verbose : {
						int OptionParams = Options.Verbose.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Verbose.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_Escrow.Report : {
						int OptionParams = Options.Report.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Report.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.Escrow (Options);

			}
示例#7
0
		private static void Handle_SSH (
					Shell Dispatch, string[] args, int index) {
			SSH		Options = new SSH ();

			var Registry = new Goedel.Registry.Registry ();

			Options.Host.Register ("host", Registry, (int) TagType_SSH.Host);
			Options.Client.Register ("client", Registry, (int) TagType_SSH.Client);
			Options.Portal.Register ("portal", Registry, (int) TagType_SSH.Portal);
			Options.UDF.Register ("udf", Registry, (int) TagType_SSH.UDF);
			Options.Verbose.Register ("verbose", Registry, (int) TagType_SSH.Verbose);
			Options.Report.Register ("report", Registry, (int) TagType_SSH.Report);

			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.Host.Parameter (args [index]);
				index++;
				}
			// looking for parameter Param.Name}
			if (index < args.Length && !IsFlag (args [index][0] )) {
				// Have got the parameter, call the parameter value method
				Options.Client.Parameter (args [index]);
				index++;
				}

#pragma warning disable 162
			for (int i = index; i< args.Length; i++) {
				if 	(!IsFlag (args [i][0] )) {
					throw new System.Exception ("Unexpected parameter: " + args[i]);}			
				string Rest = args [i].Substring (1);

				TagType_SSH TagType = (TagType_SSH) Registry.Find (Rest);

				// here have the cases for what to do with it.

				switch (TagType) {
					case TagType_SSH.Portal : {
						int OptionParams = Options.Portal.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Portal.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_SSH.UDF : {
						int OptionParams = Options.UDF.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.UDF.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_SSH.Verbose : {
						int OptionParams = Options.Verbose.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Verbose.Parameter (args[i]);
								}
							}
						break;
						}
					case TagType_SSH.Report : {
						int OptionParams = Options.Report.Tag (Rest);
						
						if (OptionParams>0 && ((i+1) < args.Length)) {
							if 	(!IsFlag (args [i+1][0] )) {
								i++;								
								Options.Report.Parameter (args[i]);
								}
							}
						break;
						}
					default : throw new System.Exception ("Internal error");
					}
				}

#pragma warning restore 162
			Dispatch.SSH (Options);

			}