private protected IParameterObserverRootNode CreateParameterObserverChain(
            object?parameter,
            IPropertyNode property)
        {
            ParameterObserverRootNode parameterObserverRoot;
            IPropertyNode             next;

            if (parameter is IReadOnlyParameter p)
            {
                if (!(property is { Next : IPropertyNode nextProperty }))
Exemplo n.º 2
0
		PropertyDefSettingsCommand(IPropertyNode propNode, PropertyDefOptions options) {
			this.propNode = propNode;
			this.newOptions = options;
			this.origOptions = new PropertyDefOptions(propNode.PropertyDef);

			this.origParentNode = (IDocumentTreeNodeData)propNode.TreeNode.Parent.Data;
			this.origParentChildIndex = this.origParentNode.TreeNode.Children.IndexOf(propNode.TreeNode);
			Debug.Assert(this.origParentChildIndex >= 0);
			if (this.origParentChildIndex < 0)
				throw new InvalidOperationException();

			this.nameChanged = origOptions.Name != newOptions.Name;
		}
 public virtual void visit(IPropertyNode value)
 {
     // TODO:  Add AbstractVisitor.SemanticTree.ISemanticVisitor.visit implementation
 }
Exemplo n.º 4
0
		public PropInfo GetProperty(IPropertyNode prop)
		{
			return (PropInfo)defs[prop];
		}
Exemplo n.º 5
0
		public PropInfo AddProperty(IPropertyNode prop, PropertyInfo pi)
		{
			PropInfo pi2 = new PropInfo(pi);
			defs[prop] = pi2;
			return pi2;
		}
Exemplo n.º 6
0
 private PropertyInfo[] get_named_properties(IPropertyNode[] props)
 {
     PropertyInfo[] arr = new PropertyInfo[props.Length];
     for (int i = 0; i < arr.Length; i++)
     {
         if (props[i] is ICompiledPropertyNode)
             arr[i] = (props[i] as ICompiledPropertyNode).property_info;
         else
             arr[i] = helper.GetProperty(props[i]).prop;
     }
     return arr;
 }
Exemplo n.º 7
0
		PropertyDefSettingsCommand(IPropertyNode propNode, PropertyDefOptions options) {
			this.propNode = propNode;
			this.newOptions = options;
			this.origOptions = new PropertyDefOptions(propNode.PropertyDef);

			this.origParentNode = (IFileTreeNodeData)propNode.TreeNode.Parent.Data;
			this.origParentChildIndex = this.origParentNode.TreeNode.Children.IndexOf(propNode.TreeNode);
			Debug.Assert(this.origParentChildIndex >= 0);
			if (this.origParentChildIndex < 0)
				throw new InvalidOperationException();

			this.nameChanged = origOptions.Name != newOptions.Name;
		}
Exemplo n.º 8
0
		DeletePropertyDefCommand(IPropertyNode[] propNodes) {
			this.nodes = new DeletableNodes<IPropertyNode>(propNodes);
		}
Exemplo n.º 9
0
			public void Delete(IPropertyNode[] nodes) {
				Debug.Assert(infos == null);
				if (infos != null)
					throw new InvalidOperationException();

				infos = new ModelInfo[nodes.Length];

				for (int i = 0; i < infos.Length; i++) {
					var node = nodes[i];

					var info = new ModelInfo(node.PropertyDef);
					infos[i] = info;
					info.OwnerType.Properties.RemoveAt(info.PropertyIndex);

					for (int j = 0; j < info.Methods.Length; j++) {
						int index = info.OwnerType.Methods.IndexOf(info.Methods[j]);
						Debug.Assert(index >= 0);
						if (index < 0)
							throw new InvalidOperationException();
						info.OwnerType.Methods.RemoveAt(index);
						info.MethodIndexes[j] = index;
					}
				}
			}
Exemplo n.º 10
0
			public void Restore(IPropertyNode[] nodes) {
				Debug.Assert(infos != null);
				if (infos == null)
					throw new InvalidOperationException();
				Debug.Assert(infos.Length == nodes.Length);
				if (infos.Length != nodes.Length)
					throw new InvalidOperationException();

				for (int i = infos.Length - 1; i >= 0; i--) {
					var node = nodes[i];
					var info = infos[i];
					info.OwnerType.Properties.Insert(info.PropertyIndex, node.PropertyDef);

					for (int j = info.Methods.Length - 1; j >= 0; j--)
						info.OwnerType.Methods.Insert(info.MethodIndexes[j], info.Methods[j]);
				}

				infos = null;
			}
Exemplo n.º 11
0
 public void visit(IPropertyNode value)
 {
     string s = value.GetType().Name + ".";
     prepare_string_node(value.name, s + "name");
     //value.comprehensive_type
     //value.get_function
     prepare_string_node(value.node_kind.ToString(), s + "node_kind");
     prepare_collection(value.parameters, s + "parameters", "parameters", value.parameters.Length);
     //value.property_type
     //value.set_function
 }
Exemplo n.º 12
0
 public ModelPropertyNodeAdapter(IModelNodeAdapterParent parent, IPropertyNode propertyNode) : base(parent)
 {
     this.propertyNode = propertyNode;
 }
Exemplo n.º 13
0
		public virtual void visit(IPropertyNode value)
		{
			// TODO:  Add AbstractVisitor.SemanticTree.ISemanticVisitor.visit implementation
		}
Exemplo n.º 14
0
 CreatePropertyDefCommand(ITypeNode ownerNode, PropertyDefOptions options)
 {
     this.ownerNode = ownerNode;
     this.propNode  = ownerNode.Create(options.CreatePropertyDef(ownerNode.TypeDef.Module));
 }
Exemplo n.º 15
0
		CreatePropertyDefCommand(ITypeNode ownerNode, PropertyDefOptions options) {
			this.ownerNode = ownerNode;
			this.propNode = ownerNode.Create(options.CreatePropertyDef(ownerNode.TypeDef.Module));
		}
Exemplo n.º 16
0
 public PropertyNodeCreator(IModuleFileNode modNode, ITypeNode ownerNode, PropertyDef property)
 {
     this.ownerNode = ownerNode;
     this.propNode  = modNode.Context.FileTreeView.Create(property);
 }
Exemplo n.º 17
0
 public void visit(IPropertyNode value)
 {
     throw new System.NotSupportedException(value.GetType().ToString());
 }