Exemplo n.º 1
0
 protected override object NewInterface(NewCodeElementItemParams newItemParams, string path)
 {
     return(_namespace.AddInterface(path,
                                    newItemParams.Position,
                                    newItemParams.ImplementedInterfaces.ToCSVDTEParameter(),
                                    newItemParams.AccessKind));
 }
 protected override object NewEnum(NewCodeElementItemParams newItemParams, string path)
 {
     return(_codeClass.AddEnum(path,
                               newItemParams.Position,
                               newItemParams.Bases.ToCSVDTEParameter(),
                               newItemParams.AccessKind));
 }
 private object NewVariable(NewCodeElementItemParams newItemParams, string path)
 {
     return(_codeModel.AddVariable(path,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.Access.ToCMAccess()));
 }
 private object NewInterface(NewCodeElementItemParams newItemParams, string path)
 {
     return(_codeModel.AddInterface(path,
                                    newItemParams.Position,
                                    newItemParams.Bases.ToCSVDTEParameter(),
                                    newItemParams.Access.ToCMAccess()));
 }
Exemplo n.º 5
0
 protected override object NewInterface(NewCodeElementItemParams newItemParams, string path)
 {
     return _namespace.AddInterface(path,
                                    newItemParams.Position,
                                    newItemParams.ImplementedInterfaces.ToCSVDTEParameter(),
                                    newItemParams.AccessKind);
 }
Exemplo n.º 6
0
 protected override object NewVariable(NewCodeElementItemParams newItemParams, string path, object newItemValue)
 {
     return(_enum.AddMember(
                path,
                newItemValue.ToDTEParameter(),
                newItemParams.Position));
 }
Exemplo n.º 7
0
 protected override object NewVariable(NewCodeElementItemParams newItemParams, string path, object newItemValue)
 {
     return _enum.AddMember(
         path,
         newItemValue.ToDTEParameter(),
         newItemParams.Position);
 }
Exemplo n.º 8
0
 protected override object NewAttribute(NewCodeElementItemParams p, string path, object newItemValue)
 {
     var value = null == newItemValue ? null : newItemValue.ToString();
     return _element.AddAttribute(path,
                                  value,
                                  p.Position.ToDTEParameter());
 }
Exemplo n.º 9
0
 protected override object NewVariable(NewCodeElementItemParams newItemParams, string path, object value)
 {
     return _codeClass.AddVariable(path,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind,
                                   Type.Missing);
 }
Exemplo n.º 10
0
 protected override object NewStruct(NewCodeElementItemParams newItemParams, string path)
 {
     return(_struct.AddStruct(path,
                              newItemParams.Position,
                              newItemParams.Bases.ToCSVDTEParameter(),
                              newItemParams.ImplementedInterfaces.ToCSVDTEParameter(),
                              newItemParams.AccessKind));
 }
Exemplo n.º 11
0
 protected override object NewMethod(NewCodeElementItemParams newItemParams, string path)
 {
     return _interface.AddFunction(path,
                                   newItemParams.FunctionKind,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind);
 }
Exemplo n.º 12
0
 protected override object NewStruct(NewCodeElementItemParams newItemParams, string path)
 {
     return _codeClass.AddStruct(path,
                                 newItemParams.Position,
                                 newItemParams.Bases.ToCSVDTEParameter(),
                                 newItemParams.ImplementedInterfaces.ToCSVDTEParameter(),
                                 newItemParams.AccessKind);
 }
 private object NewMethod(NewCodeElementItemParams newItemParams, string path)
 {
     return(_codeModel.AddFunction(path,
                                   newItemParams.MethodType.ToCMFunction(),
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.Access.ToCMAccess()));
 }
        private object NewAttribute(NewCodeElementItemParams p, string path, object newItemValue)
        {
            var value = null == newItemValue ? null : newItemValue.ToString();

            return(_codeModel.AddAttribute(path,
                                           value,
                                           p.Position.ToDTEParameter()));
        }
Exemplo n.º 15
0
 protected override object NewVariable(NewCodeElementItemParams newItemParams, string path, object value)
 {
     return(_codeClass.AddVariable(path,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind,
                                   Type.Missing));
 }
 protected override object NewMethod(NewCodeElementItemParams newItemParams, string path)
 {
     return(_interface.AddFunction(path,
                                   newItemParams.FunctionKind,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind));
 }
Exemplo n.º 17
0
 protected override object NewDelegate(NewCodeElementItemParams newItemParams, string path)
 {
     return(_codeClass.AddDelegate(path,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind
                                   ));
 }
        protected override object NewAttribute(NewCodeElementItemParams p, string path, object newItemValue)
        {
            var value = null == newItemValue ? null : newItemValue.ToString();

            return(_interface.AddAttribute(path,
                                           value,
                                           p.Position.ToDTEParameter()));
        }
Exemplo n.º 19
0
 protected override object NewProperty(NewCodeElementItemParams newItemParams, string path)
 {
     return _codeClass.AddProperty(newItemParams.Get ? path : null,
                                   newItemParams.Set ? path : null,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind,
                                   Type.Missing);
 }
 protected override object NewProperty(NewCodeElementItemParams newItemParams, string path)
 {
     return(_interface.AddProperty(newItemParams.Get ? path : null,
                                   newItemParams.Set ? path : null,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind,
                                   Type.Missing));
 }
Exemplo n.º 21
0
 protected override object NewEvent(NewCodeElementItemParams newCodeElementItemParams, string path)
 {
     return(_codeClass.AddEvent(
                path,
                newCodeElementItemParams.MemberType,
                false,
                Type.Missing,
                newCodeElementItemParams.AccessKind
                ));
 }
 protected override object NewEvent(NewCodeElementItemParams newCodeElementItemParams, string path)
 {
     return(_interface.AddEvent(
                path,
                newCodeElementItemParams.MemberType,
                false,
                Type.Missing,
                newCodeElementItemParams.Access.ToCMAccess()
                ));
 }
Exemplo n.º 23
0
 protected override object NewEvent(NewCodeElementItemParams newCodeElementItemParams, string path)
 {
     return _interface.AddEvent(
         path,
         newCodeElementItemParams.MemberType,
         false,
         Type.Missing,
         newCodeElementItemParams.Access.ToCMAccess()
         );
 }
Exemplo n.º 24
0
 protected override object NewEvent(NewCodeElementItemParams newCodeElementItemParams, string path)
 {
     return _codeClass.AddEvent(
         path,
         newCodeElementItemParams.MemberType,
         false,
         Type.Missing,
         newCodeElementItemParams.AccessKind
         );
 }
Exemplo n.º 25
0
 protected override object NewParameter(NewCodeElementItemParams newItemParams, string path, object value)
 {
     CodeProperty2 p2 = _property as CodeProperty2;
     if (null == p2)
     {
         throw new PropertyDoesNotSupportParametersException(_property.Name);
     }
     return p2.AddParameter(path,
                            newItemParams.MemberType,
                            newItemParams.Position);
 }
Exemplo n.º 26
0
        protected override object NewParameter(NewCodeElementItemParams newItemParams, string path, object value)
        {
            CodeProperty2 p2 = _property as CodeProperty2;

            if (null == p2)
            {
                throw new PropertyDoesNotSupportParametersException(_property.Name);
            }
            return(p2.AddParameter(path,
                                   newItemParams.MemberType,
                                   newItemParams.Position));
        }
        private object NewImport(NewCodeElementItemParams newItemParams, string path, object newItemValue)
        {
            FileCodeModel2 fileCodeModel2 = _codeModel as FileCodeModel2;

            if (null == fileCodeModel2)
            {
                return(null);
            }

            // apparantly required to prevent an exception in VS
            newItemParams.Position = Math.Max(newItemParams.Position, 0);

            return(fileCodeModel2.AddImport(path, newItemParams.Position, String.Empty));
        }
        private object NewProperty(NewCodeElementItemParams newItemParams, string path)
        {
            var kind = vsCMFunction.vsCMFunctionPropertyGet;

            if (newItemParams.Set.IsPresent)
            {
                kind |= vsCMFunction.vsCMFunctionPropertySet;
            }

            return(_codeModel.AddFunction(path,
                                          kind,
                                          newItemParams.MemberType,
                                          newItemParams.Position,
                                          newItemParams.Access.ToCMAccess()
                                          ));
        }
Exemplo n.º 29
0
 protected override object NewParameter(NewCodeElementItemParams newItemParams, string path, object value)
 {
     return(_element.AddParameter(path,
                                  newItemParams.MemberType,
                                  newItemParams.Position));
 }
Exemplo n.º 30
0
 protected override object NewNamespace(NewCodeElementItemParams newItemParams, string path)
 {
     return(_namespace.AddNamespace(path,
                                    newItemParams.Position));
 }
Exemplo n.º 31
0
 private object NewAttribute(NewCodeElementItemParams p, string path, object newItemValue)
 {
     var value = null == newItemValue ? null : newItemValue.ToString();
     return _codeModel.AddAttribute(path,
                                    value,
                                    p.Position.ToDTEParameter());
 }
Exemplo n.º 32
0
 private object NewClass(NewCodeElementItemParams newItemParams, string path)
 {
     return _codeModel.AddClass(path,
                                newItemParams.Position,
                                newItemParams.Bases.ToCSVDTEParameter(),
                                newItemParams.ImplementedInterfaces.ToCSVDTEParameter(),
                                newItemParams.Access.ToCMAccess()
         );
 }
 protected virtual object NewClass(NewCodeElementItemParams newItemParams, string path)
 {
     return null;
 }
 protected virtual object NewVariable(NewCodeElementItemParams newItemParams, string path, object newItemValue)
 {
     return null;
 }
 private object NewNamespace(NewCodeElementItemParams newItemParams, string path)
 {
     return(_codeModel.AddNamespace(path,
                                    newItemParams.Position));
 }
Exemplo n.º 36
0
 protected override object NewParameter(NewCodeElementItemParams newItemParams, string path, object value)
 {
     return _element.AddParameter(path,
                                  newItemParams.MemberType,
                                  newItemParams.Position);
 }
 protected virtual object NewImport(NewCodeElementItemParams p, string path, object newItemValue)
 {
     return null;
 }
Exemplo n.º 38
0
 protected virtual object NewVariable(NewCodeElementItemParams newItemParams, string path, object newItemValue)
 {
     return(null);
 }
Exemplo n.º 39
0
        private object NewImport(NewCodeElementItemParams newItemParams, string path, object newItemValue)
        {
            FileCodeModel2 fileCodeModel2 = _codeModel as FileCodeModel2;
            if (null == fileCodeModel2)
            {
                return null;
            }

            // apparantly required to prevent an exception in VS
            newItemParams.Position = Math.Max(newItemParams.Position, 0);

            return fileCodeModel2.AddImport(path, newItemParams.Position, String.Empty);
        }
Exemplo n.º 40
0
 protected virtual object NewImport(NewCodeElementItemParams p, string path, object newItemValue)
 {
     return(null);
 }
Exemplo n.º 41
0
        private object NewProperty(NewCodeElementItemParams newItemParams, string path)
        {
            var kind = vsCMFunction.vsCMFunctionPropertyGet;
            if (newItemParams.Set.IsPresent)
            {
                kind |= vsCMFunction.vsCMFunctionPropertySet;
            }

            return _codeModel.AddFunction(path,
                                          kind,
                                          newItemParams.MemberType,
                                          newItemParams.Position,
                                          newItemParams.Access.ToCMAccess()
                );
        }
Exemplo n.º 42
0
 private object NewNamespace(NewCodeElementItemParams newItemParams, string path)
 {
     return _codeModel.AddNamespace(path,
                                    newItemParams.Position);
 }
Exemplo n.º 43
0
 protected override object NewParameter(NewCodeElementItemParams newItemParams, string path, object newValue)
 {
     return(_attribute.AddArgument(newValue.ToString(), path, newItemParams.Position));
 }
Exemplo n.º 44
0
 private object NewMethod(NewCodeElementItemParams newItemParams, string path)
 {
     return _codeModel.AddFunction(path,
                                   newItemParams.MethodType.ToCMFunction(),
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.Access.ToCMAccess());
 }
Exemplo n.º 45
0
 protected virtual object NewClass(NewCodeElementItemParams newItemParams, string path)
 {
     return(null);
 }
Exemplo n.º 46
0
 private object NewDelegate(NewCodeElementItemParams newItemParams, string path)
 {
     return _codeModel.AddDelegate(path,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.Access.ToCMAccess()
         );
 }
Exemplo n.º 47
0
 protected override object NewNamespace(NewCodeElementItemParams newItemParams, string path)
 {
     return _namespace.AddNamespace(path,
                                    newItemParams.Position);
 }
Exemplo n.º 48
0
 protected override object NewParameter(NewCodeElementItemParams newItemParams, string path, object newValue)
 {
     return _attribute.AddArgument(newValue.ToString(), path, newItemParams.Position);
 }
Exemplo n.º 49
0
 protected override object NewDelegate(NewCodeElementItemParams newItemParams, string path)
 {
     return _namespace.AddDelegate(path,
                                   newItemParams.MemberType,
                                   newItemParams.Position,
                                   newItemParams.AccessKind
         );
 }
Exemplo n.º 50
0
 protected override object NewEnum(NewCodeElementItemParams newItemParams, string path)
 {
     return _struct.AddEnum(path,
                            newItemParams.Position,
                            newItemParams.Bases.ToCSVDTEParameter(),
                            newItemParams.AccessKind);
 }