当前位置: 首页>>代码示例>>Python>>正文


Python base.AbstractConstructedAsn1Item方法代码示例

本文整理汇总了Python中pyasn1.type.base.AbstractConstructedAsn1Item方法的典型用法代码示例。如果您正苦于以下问题:Python base.AbstractConstructedAsn1Item方法的具体用法?Python base.AbstractConstructedAsn1Item怎么用?Python base.AbstractConstructedAsn1Item使用的例子?那么, 这里精选的方法代码示例或许可以为您提供帮助。您也可以进一步了解该方法所在pyasn1.type.base的用法示例。


在下文中一共展示了base.AbstractConstructedAsn1Item方法的10个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的Python代码示例。

示例1: _cloneComponentValues

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def _cloneComponentValues(self, myClone, cloneValueFlag):
        try:
            c = self.getComponent()
        except error.PyAsn1Error:
            pass
        else:
            if isinstance(c, Choice):
                tagSet = c.getEffectiveTagSet()
            else:
                tagSet = c.getTagSet()
            if isinstance(c, base.AbstractConstructedAsn1Item):
                myClone.setComponentByType(
                    tagSet, c.clone(cloneValueFlag=cloneValueFlag)
                    )
            else:
                myClone.setComponentByType(tagSet, c.clone()) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:18,代码来源:univ.py

示例2: _cloneComponentValues

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def _cloneComponentValues(self, myClone, cloneValueFlag):
        try:
            c = self.getComponent()
        except error.PyAsn1Error:
            pass
        else:
            if isinstance(c, Choice):
                tagSet = c.getEffectiveTagSet()
            else:
                tagSet = c.getTagSet()
            if isinstance(c, base.AbstractConstructedAsn1Item):
                myClone.setComponentByType(
                    tagSet, c.clone(cloneValueFlag=cloneValueFlag)
                )
            else:
                myClone.setComponentByType(tagSet, c.clone()) 
开发者ID:proxysh,项目名称:Safejumper-for-Desktop,代码行数:18,代码来源:univ.py

示例3: _cloneComponentValues

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def _cloneComponentValues(self, myClone, cloneValueFlag):
        try:
            component = self.getComponent()
        except error.PyAsn1Error:
            pass
        else:
            if isinstance(component, Choice):
                tagSet = component.effectiveTagSet
            else:
                tagSet = component.tagSet
            if isinstance(component, base.AbstractConstructedAsn1Item):
                myClone.setComponentByType(
                    tagSet, component.clone(cloneValueFlag=cloneValueFlag)
                )
            else:
                myClone.setComponentByType(tagSet, component.clone()) 
开发者ID:tp4a,项目名称:teleport,代码行数:18,代码来源:univ.py

示例4: encodeValue

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def encodeValue(self, encodeFun, value, defMode, maxChunkSize):
        if isinstance(value, base.AbstractConstructedAsn1Item):
            value = value.clone(tagSet=value.getTagSet()[:-1],
                                cloneValueFlag=1)
        else:
            value = value.clone(tagSet=value.getTagSet()[:-1])
        return encodeFun(value, defMode, maxChunkSize), 1 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:9,代码来源:encoder.py

示例5: __init__

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def __init__(self, componentType=None, tagSet=None,
                 subtypeSpec=None, sizeSpec=None):
        if componentType is None:
            componentType = self.componentType
        base.AbstractConstructedAsn1Item.__init__(
            self, componentType.clone(), tagSet, subtypeSpec, sizeSpec
        )
        self._componentTypeLen = len(self._componentType) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:10,代码来源:univ.py

示例6: __getitem__

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def __getitem__(self, idx):
        if isinstance(idx, str):
            return self.getComponentByName(idx)
        else:
            return base.AbstractConstructedAsn1Item.__getitem__(self, idx) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:7,代码来源:univ.py

示例7: __setitem__

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def __setitem__(self, idx, value):
        if isinstance(idx, str):
            self.setComponentByName(idx, value)
        else:
            base.AbstractConstructedAsn1Item.__setitem__(self, idx, value) 
开发者ID:aliyun,项目名称:oss-ftp,代码行数:7,代码来源:univ.py

示例8: encode

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def encode(self, encodeFun, value):
        if isinstance(value, base.AbstractConstructedAsn1Item):
            value = value.clone(tagSet=value.getTagSet()[:-1],
                                cloneValueFlag=1)
        else:
            value = value.clone(tagSet=value.getTagSet()[:-1])
        return encodeFun(value) 
开发者ID:proxysh,项目名称:Safejumper-for-Desktop,代码行数:9,代码来源:encoder.py

示例9: __getitem__

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def __getitem__(self, idx):
        if octets.isStringType(idx):
            return self.getComponentByName(idx)
        else:
            return base.AbstractConstructedAsn1Item.__getitem__(self, idx) 
开发者ID:proxysh,项目名称:Safejumper-for-Desktop,代码行数:7,代码来源:univ.py

示例10: __init__

# 需要导入模块: from pyasn1.type import base [as 别名]
# 或者: from pyasn1.type.base import AbstractConstructedAsn1Item [as 别名]
def __init__(self, *args, **kwargs):
        # support positional params for backward compatibility
        if args:
            for key, value in zip(('componentType', 'tagSet',
                                   'subtypeSpec', 'sizeSpec'), args):
                if key in kwargs:
                    raise error.PyAsn1Error('Conflicting positional and keyword params!')
                kwargs['componentType'] = value

        base.AbstractConstructedAsn1Item.__init__(self, **kwargs)

    # Python list protocol 
开发者ID:tp4a,项目名称:teleport,代码行数:14,代码来源:univ.py


注:本文中的pyasn1.type.base.AbstractConstructedAsn1Item方法示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。