public void CreatePrimDisplay(IPrim prim) { var primCreator = DevPrimsFactoryManager.Instance.FindCreator(prim.PrimTypeName); if (primCreator == null) { MessageBox.Show($"未找到该设备{prim.PrimTypeName}创建器ICreator,请重新加载该设备Dll!"); return; } var primDisplay = new PrimDisplay(); primDisplay.UIPrimIcon = primCreator.PrimProps.Icon; primDisplay.UIPrimName = prim.Name; primDisplay.UIPrimGroup = primCreator.PrimProps.DisplayGroup; primDisplay.UIPrimType = primCreator.PrimProps.DisplayName; primDisplay.panel1.AutoSize = false; primDisplay.panel1.Size = new Size(56, 52); primDisplay.UIPrimID = prim.PrimId; primDisplay.UIPrim = prim; primDisplay.PrimDisplayMenuClickEvent += OnPrimDisplayMenuClickEvent; primDisplay.PrimDisplayPropertyChanged += OnPrimDisplayPropertyChanged; primDisplay.Dock = DockStyle.Top; splitContainer1.Panel1.Controls.Add(primDisplay); _primDisplayList.Add(primDisplay); if (OnAddPrim != null) { OnAddPrim(primDisplay.UIPrimGroup, primDisplay.UIPrimType, primDisplay.UIPrimName, primDisplay.UIPrimID); } }
public ChatButtonSetupSingle(IPrimFactory factory, IPrim host) { _host = host; _owner = host.Owner; _cont = true; _boundButtons = new HashSet <string>(); _requestedButtons = new HashSet <string>(); Random r = new Random(); _channel = r.Next(int.MinValue, -1); factory.AddChannelListener(_channel, (button, id, text, channel) => { string[] msg = text.Split(','); UUID owner; if (msg.Length == 2 && msg[0].Equals(INIT) && UUID.TryParse(msg[1], out owner) && owner.Equals(_owner)) { _boundButtons.Add(button); if (_requestedButtons.Contains(button)) { _requestedButtons.Remove(button); if (ButtonRegistered != null) { ButtonRegistered(button, _owner); } } } }); NotifyChannel(); }
public ChatButtonSetupSingle(IPrimFactory factory, IPrim host) { _host = host; _owner = host.Owner; _cont = true; _boundButtons = new HashSet<string>(); _requestedButtons = new HashSet<string>(); Random r = new Random(); _channel = r.Next(int.MinValue, -1); factory.AddChannelListener(_channel, (button, id, text, channel) => { string[] msg = text.Split(','); UUID owner; if (msg.Length == 2 && msg[0].Equals(INIT) && UUID.TryParse(msg[1], out owner) && owner.Equals(_owner)) { _boundButtons.Add(button); if (_requestedButtons.Contains(button)) { _requestedButtons.Remove(button); if (ButtonRegistered != null) ButtonRegistered(button, _owner); } } }); NotifyChannel(); }
public Record(IToggle toggle, SandboxControl control, IPrim hostPrim, IPrimFactory factory, IConfig controlConfig) : base(toggle) { _control = control; _save = new SaveDialog(hostPrim, factory, "sequence", control.DefaultRecordingName, name => control.Record.GetFolder(name)); _save.OnSave += (name, id, file) => control.Record.SaveRecording(name, file); }
public SaveDialog(IPrim prim, IPrimFactory factory, string toSave, string defaultName, Func <string, string> getFolder) { _defaultName = defaultName; _toSave = toSave; _getFolder = getFolder; dialog = new Dialog(prim, factory, SAVE, SAVE_AS, Dialog.CANCEL); dialog.ResponseReceived += (name, id, pressed, chatted) => { switch (pressed) { case SAVE: if (OnSave != null) { OnSave(name, id, GetDefaultName(name)); } break; case SAVE_AS: if (chatted == null) { Show(name, id, true); } else if (OnSave != null) { OnSave(name, id, chatted); } break; case Dialog.CANCEL: break; } }; }
protected override IPrim InitPrim(IPrimFactory primFactory, Vector3 position) { IPrim p = primFactory.MakePrim(Name, position, DefaultColour, new Vector3(0f, 0f, .001f), PrimType.Cylinder); p.Editable = false; return(p); }
public PrimWrapper(IPrimFactory primFactory, Vector3 position, string name) : base(name) { _log = LogManager.GetLogger(GetType()); _prim = InitPrim(primFactory, position); _prim.Name = name; }
public SelectDialog(IPrim prim, IPrimFactory factory, Func <string, string> getFolder, string sharedFolder) { _getFolder = getFolder; _sharedFolder = sharedFolder; _fileSubsets = new Dictionary <UUID, int>(); _dialog = new Dialog(prim, factory); _dialog.ResponseReceived += (name, id, pressed, chatted) => { switch (pressed) { case MORE: ShowNextSet(name, id); break; case Dialog.CANCEL: _fileSubsets.Remove(id); break; default: _fileSubsets.Remove(id); if (OnSelect != null) { OnSelect(name, id, pressed); } break; } }; }
public PrimDefaultConfigControl(IPrim prim) { InitializeComponent(); propertyGrid1.SelectedObject = prim; }
public PrimWrapper(IPrimFactory primFactory, Vector3 position, string name, Color colour, double selected, Parameters parameters) : base(name, colour, selected, parameters) { _log = LogManager.GetLogger(GetType()); _prim = InitPrim(primFactory, position); _prim.Name = name; }
public Record(IToggle toggle, SandboxControl control, IPrim hostPrim, IPrimFactory factory, IConfig controlConfig) : base(toggle) { _control = control; _save = new SaveDialog(hostPrim, factory, "sequence", control.DefaultRecordingName, name => control.Record.GetUserFolder(name)); _save.OnSave += (name, id, file) => control.Record.SaveRecording(name, file); }
static public void addPrim(string name, IPrim prim) { if (prims == null) { throw new Exception("setupPrims must be called first"); } prims[name] = prim; }
private IObject RegisterPrim(IPrim prim, IObject obj, string name) { UUID id = obj.GlobalID; lock (_prims) _prims.Add(id, prim); return(obj); }
public void RegisterPrim(IPrim prim) { if (_prims.ContainsKey(prim.ID)) { return; } lock (_prims) _prims.Add(prim.ID, prim); }
protected IPrim FindPRIM(string primName) { IPrim prim = Context.PRIMLibrary.GetPrimByName(primName); if (prim == null) { throw new Exception(String.Format("PRIM not found: {0}", primName)); } return(prim); }
protected override IPrim InitPrim(IPrimFactory primFactory, Vector3 position) { IPrim p = primFactory.MakePrim(Name, position, DefaultColour, new Vector3(0f, 0f, .001f), PrimType.Cylinder); p.Editable = false; //ISpy<IPrim> pSpy = new Spy<IPrim>(p); //pSpy.OnMethodEvent += (source, method, ret, parameters) => p.Say("Called " + method.Name); //return pSpy.Instance; return(p); }
public Dialog(IPrim prim, IPrimFactory factory) { _prim = prim; _primFactory = factory; _receivedText = new Dictionary<UUID, string>(); _primFactory.AddChannelListener(ChatChannel, (name, id, text, channel) => { if (_receivedText.ContainsKey(id)) _receivedText[id] = text; }); }
protected override IPrim InitPrim(IPrimFactory primFactory, Vector3 position) { bool isEP = Parameters.Get <bool>("IsEP"); bool locked = Parameters.Get <bool>("Lock"); Logger.Info("Creating prim with colour " + DefaultColour); IPrim p = primFactory.MakePrim(Name, position, DefaultColour, new Vector3(.5f, .5f, .5f), isEP ? PrimType.Cylinder : PrimType.Sphere, Quaternion.Identity); p.Editable = !locked; return(p); }
public Dialog(IPrim prim, IPrimFactory factory) { _prim = prim; _primFactory = factory; _receivedText = new Dictionary <UUID, string>(); _primFactory.AddChannelListener(ChatChannel, (name, id, text, channel) => { if (_receivedText.ContainsKey(id)) { _receivedText[id] = text; } }); }
public OriginalControl(IKeyTableFactory tableFactory, IAsynchQueueFactory queueFactory, IPrimFactory primFactory, IModel model, UUID hostID, IConfigSource config) : base(tableFactory, queueFactory) { _hostPrim = primFactory[hostID]; _readerMap = new Dictionary <string, UUID>(); _writerMap = tableFactory.MakeKeyTable <string>(); _paused = tableFactory.MakeKeyTable <bool>(); IConfig controlConfig = config.Configs["Control"]; IConfig commonConfig = config.Configs["Common"]; if (controlConfig == null) { controlConfig = config.Configs[0]; } if (commonConfig == null) { commonConfig = config.Configs[0]; } _wait = commonConfig.GetInt("Wait", 50); _userFolder = controlConfig.Get("UserFolder", "."); _recordingEnabled = controlConfig.GetBoolean("RecordingEnabled", false); _timing = controlConfig.GetBoolean("TimedPlayback", true); _schemaFile = controlConfig.GetString("TopologySchema", null); _reader = new OpenSimLogReader(_readerMap, model, HostPrim.Pos); _reader.MapInstance <IModule>(this); _writers = tableFactory.MakeKeyTable <IXmlLogWriter>(); _factory = primFactory; if (_recordingEnabled) { _modelWriter = new OpenSimLogWriter <IModel>(_writerMap, model, HostPrim.Pos, true, false); _model = _modelWriter.Instance; IXmlLogWriter <IModule> baseWriter = new OpenSimLogWriter <IModule>(_writerMap, this, HostPrim.Pos, true); _recordingBase = baseWriter.Instance; _writers.Add(hostID, baseWriter); } else { _model = model; } Namespace = controlConfig.Get("Namespace", Namespace); Logger.Info("Control started."); }
public void OnCellOutputUpdateEvent(Guid cellGuid) { ICell cell = CellsManager.Instance.GetDefCellByGuid(cellGuid); if (cell == null) { return; } Cell dCell = (Cell)cell; if (dCell.CellOutputForm == null) { return; } foreach (GlobalCell.CellConfig outConfig in dCell.CellConfigs.PrimConfigList) { if (outConfig.PrimGuid == null) { continue; } IPrim prim = DevPrimsManager.Instance.GetPrimByGUID(outConfig.PrimGuid); if (prim == null) { return; } dCell.CellOutputForm.Controls.Clear(); if (outConfig.OutputUIDis) { dCell.CellOutputForm.Controls.Add(prim.PrimOutputUI); } if (outConfig.ConfigUIDis) { dCell.CellOutputForm.Controls.Add(prim.PrimConfigUI); } if (outConfig.DebugUIDis) { dCell.CellOutputForm.Controls.Add(prim.PrimDebugUI); } } }
private void btnRun_Click(object sender, EventArgs e) { IPrim prim = DevPrimsManager.Instance.GetPrimByName(_di.Driver); if (prim == null) { MessageBox.Show("没有找到名称为: " + _di.Driver + " 的设备!"); return; } if (_motion != prim) { _motion = (IMotionCard)prim; } btnRun.BackColor = Color.Green; tmrUpdateCylinder.Start(); }
public SequenceManager(IModule control, IControlUtil controlUtil, IConfig controlConfig, IPrimFactory factory, IKeyTableFactory tableFactory, IAsynchQueue queue) : base(controlConfig) { _queue = queue; _controlUtil = controlUtil; _hostPrim = controlUtil.HostPrim; _readerMap = new Dictionary <string, UUID>(); _writerMap = tableFactory.MakeKeyTable <string>(); _recordingEnabled = controlConfig.GetBoolean("RecordingEnabled", false); _sequenceFolder = controlConfig.Get(FOLDER_KEY, "."); _timing = controlConfig.GetBoolean("TimedPlayback", true); _reader = new OpenSimLogReader(_readerMap, control, _hostPrim.Pos); _reader.MapInstance <IModule>(control); _writers = tableFactory.MakeKeyTable <IXmlLogWriter>(); _control = Make <IModule>(new RecordControl(control), true); }
public bool RemovePrim(UUID id) { if (!_prims.ContainsKey(id)) { return(false); } IPrim prim = _prims[id]; if (prim is MRMPrim) { ((MRMPrim)prim).RemoveListeners(); } prim.Editable = true; IObject obj = GetIObject(id); if (obj != null && obj.Exists) { obj.Scale = Vector3.Zero; } _logger.Debug("Queued " + prim.Name + " to be removed."); _factoryQ.QWork("Remove Primitive", () => { if (!_prims.ContainsKey(id)) { return; } lock (_prims) _prims.Remove(id); if (_recycle && _freeObjects.Count < MAX_RECYCLED_PRIMS) { _freeObjects.Add(id, GetIObject(id)); _logger.Info("Recycled " + prim.Name + "."); } else { WorldRemove(id); } }); return(true); }
public LockedPermissions(IPrimFactory factory, IConfigSource config, IPrim host, Control.Impl.Module.Control control) { _ownerID = UUID.Zero; _host = host; IConfig controlConfig = config.Configs["Control"]; double fade = controlConfig.GetDouble("LockFade", control.Fade); double glow = controlConfig.GetDouble("LockGlow", control.ToggleGlow); _lockWait = controlConfig.GetInt("ControlsLockTimeout", 300000); _lockToggle = new Toggle(factory.MakeButton("Lock", new LockPermissions(this)), fade, glow); _lockToggle.OnToggledOn += (source, args) => SetCurrentOwner(args.ID, args.Name); _lockToggle.OnToggledOff += (source, args) => { _ownerID = UUID.Zero; _host.Say(_ownerName + " relinquished control of sandbox."); JM726.Lib.Static.Util.Wake(this); }; _lockToggle.OnTouched += (source, args) => { if (_Locked && !args.AvatarID.Equals(_ownerID)) _host.Say("Unable to take control of sandbox. Sandbox is currently locked to '" + _ownerName + "'."); }; }
public SelectDialog(IPrim prim, IPrimFactory factory, Func<string, string> getFolder) { _getFolder = getFolder; _fileSubsets = new Dictionary<UUID, int>(); _dialog = new Dialog(prim, factory); _dialog.ResponseReceived += (name, id, pressed, chatted) => { switch (pressed) { case MORE: ShowNextSet(name, id); break; case Dialog.CANCEL: _fileSubsets.Remove(id); break; default: _fileSubsets.Remove(id); if (OnSelect != null) OnSelect(name, id, pressed); break; } }; }
public IObject RegisterPrim(IPrim prim, UUID id) { IObject obj = GetIObject(id); //If the prim is already registered if (_prims.ContainsKey(id) && obj != null) { return(obj); } //If the prim does not exist in world if (obj == null || _freeObjects.ContainsKey(id)) { if (_prims.ContainsKey(id)) { RemovePrim(id); } throw new Exception("Unable to register primitive. The given ID does not exist in world. " + (obj == null ? "null" : "recycled")); } //If the prim exists in world but is not registered return(RegisterPrim(prim, obj, obj.Name)); }
public static PrimSpec ClonePrim(IPrim prim) { return(new PrimSpec { Name = prim.Name, IsEquivalentTo = prim.IsEquivalentTo, BusinessTerms = new List <string>(prim.BusinessTerms), Definition = prim.Definition, FractionDigits = prim.FractionDigits, LanguageCode = prim.LanguageCode, Length = prim.Length, MaximumExclusive = prim.MaximumExclusive, MaximumInclusive = prim.MaximumInclusive, MaximumLength = prim.MaximumLength, MinimumExclusive = prim.MinimumExclusive, MinimumInclusive = prim.MinimumInclusive, MinimumLength = prim.MinimumLength, Pattern = prim.Pattern, TotalDigits = prim.TotalDigits, VersionIdentifier = prim.VersionIdentifier, WhiteSpace = prim.WhiteSpace, }); }
public SaveDialog(IPrim prim, IPrimFactory factory, string toSave, string defaultName, Func<string, string> getFolder) { _defaultName = defaultName; _toSave = toSave; _getFolder = getFolder; dialog = new Dialog(prim, factory, SAVE, SAVE_AS, Dialog.CANCEL); dialog.ResponseReceived += (name, id, pressed, chatted) => { switch (pressed) { case SAVE: if (OnSave != null) OnSave(name, id, GetDefaultName(name)); break; case SAVE_AS: if (chatted == null) Show(name, id, true); else if (OnSave != null) OnSave(name, id, chatted); break; case Dialog.CANCEL: break; } }; }
public Open(IButton button, IControlUtil control, IPrimFactory factory) : base(button) { IPrim prim = button.Prims.Count() > 0 ? button.Prims.First() : factory.Host; _dialog = new Dialog(prim, factory, SEQUENCE, TOPOLOGY, Dialog.CANCEL); SelectDialog openSequenceDialog = new SelectDialog(prim, factory, name => control.Record.GetUserFolder(name), control.Record.SharedFolder); SelectDialog openTopologyDialog = new SelectDialog(prim, factory, name => control.Topology.GetUserFolder(name), control.Topology.SharedFolder); _dialog.ResponseReceived += (name, id, text, chat) => { if (text.Equals(Dialog.CANCEL)) { return; } switch (text) { case SEQUENCE: openSequenceDialog.Show(name, id); break; case TOPOLOGY: openTopologyDialog.Show(name, id); break; } }; openSequenceDialog.OnSelect += (name, id, file) => control.Record.PlayRecording(name, id, file); openTopologyDialog.OnSelect += (name, id, file) => control.Topology.LoadTopology(name, id, file); }
public LockedPermissions(IPrimFactory factory, IConfigSource config, IPrim host, Control.Impl.Module.Control control) { _ownerID = UUID.Zero; _host = host; IConfig controlConfig = config.Configs["Control"]; double fade = controlConfig.GetDouble("LockFade", control.Fade); double glow = controlConfig.GetDouble("LockGlow", control.ToggleGlow); _lockWait = controlConfig.GetInt("ControlsLockTimeout", 300000); _lockToggle = new Toggle(factory.MakeButton("Lock", new LockPermissions(this)), fade, glow); _lockToggle.OnToggledOn += (source, args) => SetCurrentOwner(args.ID, args.Name); _lockToggle.OnToggledOff += (source, args) => { _ownerID = UUID.Zero; _host.Say(_ownerName + " relinquished control of sandbox."); JM726.Lib.Static.Util.Wake(this); }; _lockToggle.OnTouched += (source, args) => { if (_Locked && !args.AvatarID.Equals(_ownerID)) { _host.Say("Unable to take control of sandbox. Sandbox is currently locked to '" + _ownerName + "'."); } }; }
public void RemovePrim(IPrim prim) { throw new NotImplementedException(); }
public Pause(IToggle toggle, IModule control, IPrim hostPrim, IPrimFactory factory, IConfig controlConfig) : base(toggle) { _control = control; }
public Faster(IButton button, IModule control, IPrim hostPrim) : base(button) { _control = control; _hostPrim = hostPrim; }
public Primapp(IPrim prim, Expression[] rands) { this.prim = prim; this.rands = rands; }
internal ButtonRegisteredArgs(IPrim prim) { Prim = prim; }
public IPrim UpdatePrim(IPrim element, PrimSpec spec) { throw new NotImplementedException(); }
public Dialog(IPrim prim, IPrimFactory factory, params string[] buttons) : this(prim, factory) { _buttons = buttons; }
public static void addPrim(string name, IPrim prim) { if (prims == null) throw new Exception("setupPrims must be called first"); prims[name] = prim; }
public RoutingTable(IButton button, Module.Control control, IPrimFactory primFactory) { _selectedButtons = new HashSet <UUID>(); _factory = primFactory; _control = control; _button = button; foreach (var prim in button.Prims) { control.Record.MakeMapped <IEntity>(new MappableEntity(prim)); prim.Glow = 0d; if (prim.IsAttachment) { prim.Colour = Color.LightGray; } } button.OnTouched += (source, args) => { IPrim p = primFactory[source]; if (_selectedButtons.Contains(source)) { p.Glow = 0d; if (p.IsAttachment) { p.Colour = Color.LightGray; } _selectedButtons.Remove(source); if (_selectedButtons.Count == 0) { control.State.ResetState(args.AvatarName, args.AvatarID); } } else { string state = control.State.GetState(args.AvatarName, args.AvatarID); if (state.Equals(SandboxControl.EPSelected) || state.Equals(SandboxControl.RouterSelected)) { ILogicEntity selectedNode = control.State.GetSelectedEntity(args.AvatarName, args.AvatarID); _control.HostPrim.Say("Displaying forwarding table for " + selectedNode.Name); control.Model.DisplayForwardingTable(selectedNode.ID, new Parameters(), source); control.State.ResetState(args.AvatarName, args.AvatarID); } else { _selectedButtons.Add(source); if (!_prims.Contains(source)) { control.Record.MakeMapped <IEntity>(new MappableEntity(primFactory[source])); _prims.Add(source); } p.Glow = control.ToggleGlow; if (p.IsAttachment) { p.Colour = Color.White; } control.State.SetState(SandboxControl.DisplayTableSelected, args.AvatarName, args.AvatarID); } } }; control.State.OnStateChange += (source, args) => { if (!args.NewState.Equals(SandboxControl.DisplayTableSelected)) { ResetSelected(); } }; }
static public Expression Parse(object a) { if (a is Symbol) { if (((Symbol)a).val.IndexOf(".") == -1) { return(new Var(a as Symbol)); } else { string aString = ((Symbol)a).val; int posLastDot = aString.LastIndexOf("."); Expression[] rands = new Expression[2]; rands[0] = Expression.Parse(Symbol.Create(aString.Substring(0, posLastDot))); rands[1] = new Lit(Symbol.Create(aString.Substring(posLastDot + 1, aString.Length - posLastDot - 1))); return(new App(Expression.Parse(Symbol.Create("get-property")), rands)); } } if (a is Pair) { Pair pair = a as Pair; object car = pair.car; switch (car.ToString()) { case "begin": Expression[] exps = new Expression[pair.cdr.Count]; int pos = 0; foreach (object obj in pair.cdr) { exps[pos] = Parse(obj); // exps[pos].Mark(obj); pos++; } Begin beginExps = new Begin(exps); // beginExps.Mark(pair); return(beginExps); case "if": Pair curr = pair.cdr; Expression test_exp = Parse(curr.car); // test_exp.Mark(curr.car); curr = curr.cdr; Expression true_exp = Parse(curr.car); // true_exp.Mark(curr.car); curr = curr.cdr; Expression false_exp = Parse(curr.car); // false_exp.Mark(curr.car); return(new If(test_exp, true_exp, false_exp)); case "quote": return(new Lit(pair.cdr.car)); case "set!": { Symbol var = pair.cdr.car as Symbol; if (var == null) { throw new Exception("set! error -> variable must be a symbol: " + Util.Dump(pair)); } Expression exp = Parse(pair.cdr.cdr.car) as Expression; // exp.Mark(pair.cdr.cdr.car); if (var.val.IndexOf('.') == -1) { Assignment assignment = new Assignment(var, exp); // assignment.Mark(pair); return(assignment); } else { string aString = var.val; int posLastDot = aString.LastIndexOf("."); Expression[] rands = new Expression[3]; rands[0] = Expression.Parse(Symbol.Create(aString.Substring(0, posLastDot))); rands[1] = new Lit(Symbol.Create(aString.Substring(posLastDot + 1, aString.Length - posLastDot - 1))); rands[2] = exp; App app = new App(Expression.Parse(Symbol.Create("set-property")), rands); // app.Mark(pair); return(app); } } case "lambda": // Debug.WriteLine("sparsing lambda " + pair.ToString()); curr = pair.cdr as Pair; Symbol[] ids = null; bool all_in_one = false; if (curr.car != null) { if (curr.car is Pair) { Object[] ids_as_obj = (curr.car as Pair).ToArray(); ids = new Symbol[ids_as_obj.Length]; for (int i = 0; i < ids_as_obj.Length; i++) { ids[i] = ids_as_obj[i] as Symbol; if (ids[i] == null) { throw new Exception("lambda error -> params must be symbols: " + Util.Dump(pair)); } } } else { all_in_one = true; ids = new Symbol[1]; ids[0] = curr.car as Symbol; if (ids[0] == null) { throw new Exception("lambda error -> params must be symbols: " + Util.Dump(pair)); } } } curr = curr.cdr as Pair; // insert implied begin if neccessary Expression body; if (curr.cdr == null) { body = Parse(curr.car); // if (curr.car is Pair) // body.Mark(curr.car); // else // body.Mark(curr); } else { Expression[] begin = new Expression[curr.Count]; pos = 0; foreach (object obj in curr) { begin[pos] = Parse(obj); // begin[pos].Mark(obj); pos++; } body = new Begin(begin); } return(new Proc(ids, body, all_in_one)); default: // app if (pair.hasMember) { Expression[] rands = new Expression[2]; if (pair.member.IndexOf('.') != -1) { string currentMember = pair.member; int posLastDot = currentMember.LastIndexOf("."); pair.member = currentMember.Substring(0, posLastDot); rands[0] = Expression.Parse(pair); pair.member = currentMember; rands[1] = new Lit(Symbol.Create(currentMember.Substring(posLastDot + 1, currentMember.Length - posLastDot - 1))); } else { pair.hasMember = false; rands[0] = Expression.Parse(pair); pair.hasMember = true; rands[1] = new Lit(Symbol.Create(pair.member)); } return(new App(Expression.Parse(Symbol.Create("get-property")), rands)); } else { Expression[] rands = null; if (pair.cdr != null) { rands = new Expression[pair.cdr.Count]; pos = 0; foreach (object obj in pair.cdr) { rands[pos] = Expression.Parse(obj); // rands[pos].Mark(obj); pos++; } } IPrim prim = Primitives.getPrim(pair.car.ToString()); if (prim != null) { Primapp primapp = new Primapp(prim, rands); // primapp.Mark(pair); return(primapp); } else { App app = new App(Expression.Parse(pair.car), rands); // app.Mark(pair); return(app); } } } } else { return(new Lit(a)); } }